Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions packages/drizzle/__tests__/drizzle.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -130,10 +130,17 @@ beforeAll(async () => {
score eql_v2_encrypted,
profile eql_v2_encrypted,
encrypted eql_v2_encrypted,
"otherField" TEXT,
created_at TIMESTAMPTZ DEFAULT NOW(),
test_run_id TEXT
)
`
// Backfill any column added after the table was first created on a
// long-lived CI database. CREATE TABLE IF NOT EXISTS is a no-op on
// those, so new columns need an explicit ADD COLUMN IF NOT EXISTS.
await postgresClient`
ALTER TABLE "protect-ci" ADD COLUMN IF NOT EXISTS "otherField" TEXT
`

const encryptedUsers = unwrapResult(
await protectClient.bulkEncryptModels(userSeedData, users),
Expand Down
7 changes: 7 additions & 0 deletions packages/protect/__tests__/supabase.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -60,10 +60,17 @@ beforeAll(async () => {
score eql_v2_encrypted,
profile eql_v2_encrypted,
encrypted eql_v2_encrypted,
"otherField" TEXT,
created_at TIMESTAMPTZ DEFAULT NOW(),
test_run_id TEXT
)
`
// Backfill any column added after the table was first created on a
// long-lived CI database. CREATE TABLE IF NOT EXISTS is a no-op on
// those, so new columns need an explicit ADD COLUMN IF NOT EXISTS.
await sql`
ALTER TABLE "protect-ci" ADD COLUMN IF NOT EXISTS "otherField" TEXT
`
// Tell PostgREST to refresh its schema cache so the supabase-js client
// can see a freshly created table without waiting for the polling
// interval. No-op on plain Postgres (no listener bound).
Expand Down
7 changes: 7 additions & 0 deletions packages/stack/__tests__/supabase.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -61,10 +61,17 @@ beforeAll(async () => {
score eql_v2_encrypted,
profile eql_v2_encrypted,
encrypted eql_v2_encrypted,
"otherField" TEXT,
created_at TIMESTAMPTZ DEFAULT NOW(),
test_run_id TEXT
)
`
// Backfill any column added after the table was first created on a
// long-lived CI database. CREATE TABLE IF NOT EXISTS is a no-op on
// those, so new columns need an explicit ADD COLUMN IF NOT EXISTS.
await sql`
ALTER TABLE "protect-ci" ADD COLUMN IF NOT EXISTS "otherField" TEXT
`
// Tell PostgREST to refresh its schema cache so the supabase-js client
// can see a freshly created table without waiting for the polling
// interval. No-op on plain Postgres (no listener bound).
Expand Down
Loading