Skip to content

Commit 7db47b9

Browse files
authored
fix: ignore more extension schemas (#895)
* fix: ignore more extension schemas * chore: update unit test
1 parent f9f13e9 commit 7db47b9

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

internal/db/diff/migra_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ func TestRunMigra(t *testing.T) {
108108
// Setup mock postgres
109109
conn := pgtest.NewConn()
110110
defer conn.Close(t)
111-
conn.Query(`SELECT schema_name FROM information_schema.schemata WHERE NOT schema_name LIKE ANY('{pgbouncer,realtime,"\\_realtime","supabase\\_functions","supabase\\_migrations","information\\_schema","pg\\_%",cron,graphql,"graphql\\_public",net,pgsodium,"pgsodium\\_masks",vault}') ORDER BY schema_name`).
111+
conn.Query(`SELECT schema_name FROM information_schema.schemata WHERE NOT schema_name LIKE ANY('{pgbouncer,realtime,"\\_realtime","supabase\\_functions","supabase\\_migrations","information\\_schema","pg\\_%",cron,graphql,"graphql\\_public",net,pgsodium,"pgsodium\\_masks",repack,tiger,"tiger\\_data","timescaledb\\_%","\\_timescaledb\\_%",topology,vault}') ORDER BY schema_name`).
112112
ReplyError(pgerrcode.DuplicateTable, `relation "test" already exists`)
113113
// Run test
114114
err := RunMigra(context.Background(), []string{}, "", "password", fsys, conn.Intercept)

internal/utils/misc.go

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -120,6 +120,12 @@ var (
120120
"net",
121121
"pgsodium",
122122
"pgsodium_masks",
123+
"repack",
124+
"tiger",
125+
"tiger_data",
126+
"timescaledb_*",
127+
"_timescaledb_*",
128+
"topology",
123129
"vault",
124130
}
125131
InternalSchemas = append([]string{

0 commit comments

Comments
 (0)