@rebasepro/server-postgres 0.17.3-canary.gdd23447 → 0.18.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (149) hide show
  1. package/LICENSE +0 -1
  2. package/README.md +31 -0
  3. package/dist/backup-argv.d.ts +19 -0
  4. package/dist/branch-argv.d.ts +28 -0
  5. package/dist/branch-prune.d.ts +77 -0
  6. package/dist/cli-collections-path.d.ts +31 -0
  7. package/dist/cli-errors.d.ts +123 -0
  8. package/dist/cli-flags.d.ts +101 -0
  9. package/dist/cli-helpers.d.ts +94 -10
  10. package/dist/collection-index-C7LopMyX.js +247 -0
  11. package/dist/collection-index-C7LopMyX.js.map +1 -0
  12. package/dist/databasePoolManager.d.ts +27 -0
  13. package/dist/{ensure-collection-policies-UCqgv_8c.js → ensure-collection-policies-CagOzEPS.js} +6 -6
  14. package/dist/{ensure-collection-policies-UCqgv_8c.js.map → ensure-collection-policies-CagOzEPS.js.map} +1 -1
  15. package/dist/{ensure-collection-tables-DgVixhX3.js → ensure-collection-tables-DbAhrjnG.js} +614 -52
  16. package/dist/ensure-collection-tables-DbAhrjnG.js.map +1 -0
  17. package/dist/index.d.ts +12 -0
  18. package/dist/index.es.js +19307 -3059
  19. package/dist/index.es.js.map +1 -1
  20. package/dist/{rls-enforcement-DvAbL9YJ.js → rls-enforcement-ClJoTboT.js} +53 -189
  21. package/dist/rls-enforcement-ClJoTboT.js.map +1 -0
  22. package/dist/schema/column-type-drift.d.ts +79 -0
  23. package/dist/schema/doctor.d.ts +42 -0
  24. package/dist/schema/ensure-collection-tables.d.ts +90 -0
  25. package/dist/schema/generate-next-step.d.ts +30 -0
  26. package/dist/schema/generate-postgres-ddl-logic.d.ts +28 -0
  27. package/dist/schema/generated-schema-staleness.d.ts +37 -0
  28. package/dist/schema/introspect-db-queries.d.ts +34 -0
  29. package/dist/security/rls-enforcement.d.ts +63 -2
  30. package/dist/services/BranchService.d.ts +86 -1
  31. package/dist/services/collection-helpers.d.ts +1 -1
  32. package/dist/services/realtimeService.d.ts +30 -2
  33. package/dist/services/row-pipeline.d.ts +12 -1
  34. package/dist/utils/pg-error-utils.d.ts +3 -1
  35. package/dist/utils/pg-numeric-number-patch.d.ts +31 -0
  36. package/package.json +32 -27
  37. package/dist/backup-service-DCk7KhhL.js +0 -9044
  38. package/dist/backup-service-DCk7KhhL.js.map +0 -1
  39. package/dist/collection-index-BRUg10H5.js +0 -5690
  40. package/dist/collection-index-BRUg10H5.js.map +0 -1
  41. package/dist/connection-GOKU3Hu5.js +0 -277
  42. package/dist/connection-GOKU3Hu5.js.map +0 -1
  43. package/dist/ensure-collection-tables-DgVixhX3.js.map +0 -1
  44. package/dist/rls-bootstrap-sql-B5C9LoJ6.js +0 -244
  45. package/dist/rls-bootstrap-sql-B5C9LoJ6.js.map +0 -1
  46. package/dist/rls-enforcement-DvAbL9YJ.js.map +0 -1
  47. package/dist/src-DiB5RP2Z.js +0 -541
  48. package/dist/src-DiB5RP2Z.js.map +0 -1
  49. package/dist/websocket-BZ4H5wUz.js +0 -8198
  50. package/dist/websocket-BZ4H5wUz.js.map +0 -1
  51. package/src/PostgresAdapter.ts +0 -91
  52. package/src/PostgresBackendDriver.ts +0 -1857
  53. package/src/PostgresBootstrapper.ts +0 -1157
  54. package/src/auth/ensure-tables.ts +0 -896
  55. package/src/auth/schema-version.ts +0 -260
  56. package/src/auth/services.ts +0 -1610
  57. package/src/backup/backup-cli.ts +0 -520
  58. package/src/backup/backup-cron.ts +0 -212
  59. package/src/backup/backup-logic.ts +0 -93
  60. package/src/backup/backup-service.ts +0 -485
  61. package/src/backup/index.ts +0 -12
  62. package/src/backup/pg-tools.ts +0 -403
  63. package/src/backup/retention.ts +0 -86
  64. package/src/cli-errors.ts +0 -265
  65. package/src/cli-helpers.ts +0 -569
  66. package/src/cli-output.ts +0 -43
  67. package/src/cli.ts +0 -1339
  68. package/src/collections/PostgresCollectionRegistry.ts +0 -108
  69. package/src/collections/buildRegistry.ts +0 -68
  70. package/src/collections/validate-relations.ts +0 -402
  71. package/src/connection.ts +0 -333
  72. package/src/data-transformer.ts +0 -845
  73. package/src/databasePoolManager.ts +0 -95
  74. package/src/history/HistoryService.ts +0 -254
  75. package/src/history/ensure-history-table.ts +0 -53
  76. package/src/index.ts +0 -19
  77. package/src/interfaces.ts +0 -60
  78. package/src/module-dir.ts +0 -7
  79. package/src/schema/atlas-argv.ts +0 -94
  80. package/src/schema/auth-schema.ts +0 -298
  81. package/src/schema/auth-users-columns.ts +0 -131
  82. package/src/schema/carved-out-migration.ts +0 -404
  83. package/src/schema/classify-change.ts +0 -436
  84. package/src/schema/collection-index.ts +0 -427
  85. package/src/schema/collections-schema-version.ts +0 -103
  86. package/src/schema/destructive-sql.ts +0 -94
  87. package/src/schema/doctor-cli.ts +0 -66
  88. package/src/schema/doctor-policy-checks.ts +0 -105
  89. package/src/schema/doctor.ts +0 -837
  90. package/src/schema/drizzle-ddl.ts +0 -33
  91. package/src/schema/dynamic-tables.test.ts +0 -302
  92. package/src/schema/dynamic-tables.ts +0 -293
  93. package/src/schema/ensure-collection-policies.ts +0 -198
  94. package/src/schema/ensure-collection-tables.test.ts +0 -518
  95. package/src/schema/ensure-collection-tables.ts +0 -1267
  96. package/src/schema/generate-drizzle-schema-logic.ts +0 -957
  97. package/src/schema/generate-drizzle-schema.ts +0 -143
  98. package/src/schema/generate-postgres-ddl-logic.ts +0 -1339
  99. package/src/schema/generate-postgres-ddl.ts +0 -180
  100. package/src/schema/generate-schema-commit.ts +0 -267
  101. package/src/schema/generated-schema-staleness.ts +0 -284
  102. package/src/schema/introspect-db-constraints.ts +0 -385
  103. package/src/schema/introspect-db-inference.ts +0 -255
  104. package/src/schema/introspect-db-logic.ts +0 -1387
  105. package/src/schema/introspect-db-naming.ts +0 -15
  106. package/src/schema/introspect-db-project.ts +0 -78
  107. package/src/schema/introspect-db-queries.ts +0 -326
  108. package/src/schema/introspect-db-structure.ts +0 -670
  109. package/src/schema/introspect-db-types.ts +0 -56
  110. package/src/schema/introspect-db.ts +0 -257
  111. package/src/schema/introspect-runtime.test.ts +0 -260
  112. package/src/schema/introspect-runtime.ts +0 -327
  113. package/src/schema/non-sql-collections.test.ts +0 -131
  114. package/src/schema/rls-bootstrap-sql.ts +0 -288
  115. package/src/schema/search-column.ts +0 -643
  116. package/src/schema/test-schema.ts +0 -11
  117. package/src/schema/vector-index.ts +0 -491
  118. package/src/security/anonymous-grants.test.ts +0 -73
  119. package/src/security/policy-drift.test.ts +0 -435
  120. package/src/security/policy-drift.ts +0 -473
  121. package/src/security/rls-enforcement.ts +0 -505
  122. package/src/services/BranchService.ts +0 -326
  123. package/src/services/FetchService.ts +0 -2115
  124. package/src/services/PersistService.ts +0 -557
  125. package/src/services/RelationService.ts +0 -978
  126. package/src/services/RelationWriteService.ts +0 -653
  127. package/src/services/cdc/CdcListener.ts +0 -103
  128. package/src/services/cdc/junction-tables.ts +0 -91
  129. package/src/services/cdc/trigger-cdc.ts +0 -173
  130. package/src/services/channel-bus/ChannelBus.ts +0 -44
  131. package/src/services/channel-bus/PostgresChannelBus.ts +0 -299
  132. package/src/services/channel-bus/index.ts +0 -114
  133. package/src/services/channel-history.ts +0 -424
  134. package/src/services/channel-presence.ts +0 -185
  135. package/src/services/collection-helpers.ts +0 -420
  136. package/src/services/dataService.ts +0 -256
  137. package/src/services/index.ts +0 -14
  138. package/src/services/junction-writes.ts +0 -295
  139. package/src/services/nested-path.ts +0 -145
  140. package/src/services/pg-notify-listener.ts +0 -151
  141. package/src/services/realtimeService.ts +0 -2545
  142. package/src/services/row-pipeline.ts +0 -240
  143. package/src/services/write-denial.ts +0 -55
  144. package/src/types.ts +0 -4
  145. package/src/utils/connection-string.ts +0 -58
  146. package/src/utils/drizzle-conditions.ts +0 -2743
  147. package/src/utils/pg-array-null-patch.ts +0 -42
  148. package/src/utils/pg-error-utils.ts +0 -391
  149. package/src/websocket.ts +0 -855
@@ -1,288 +0,0 @@
1
- import { LEGACY_RLS_SCHEMA, REBASE_SCHEMA } from "@rebasepro/types";
2
-
3
- /**
4
- * Canonical SQL bootstrap for the RLS helper functions.
5
- *
6
- * Generated RLS policies reference `rebase.uid()` / `rebase.roles()` /
7
- * `rebase.jwt()`, so any SQL stream that can contain policies must be
8
- * self-contained: it has to (re)create these helpers first. This matters for
9
- * the migration directory in particular — Atlas replays migrations against a
10
- * clean dev database where no out-of-band bootstrap has ever run, so a
11
- * migration carrying policies without this preamble fails with
12
- * "function rebase.uid() does not exist".
13
- *
14
- * Idempotent (`IF NOT EXISTS` / `OR REPLACE`) so it can be prepended to every
15
- * policies block and re-applied freely. The runtime boot path
16
- * (`auth/ensure-tables.ts`) creates the same functions under an advisory lock
17
- * for HMR-safety; keep the definitions in sync.
18
- *
19
- * ## Creating the `rebase` schema here is now safe, and required
20
- *
21
- * It deliberately did not, once. These functions lived in a schema called
22
- * `auth`, and the note here read: creating `rebase` would leak it into Atlas's
23
- * replayed migration state, and — absent from the desired `schema.sql` — Atlas
24
- * would then plan `DROP SCHEMA "rebase" CASCADE`, taking the auth tables with
25
- * it. That reasoning still holds; what changed is the second half of it. The
26
- * DDL generator now emits `CREATE SCHEMA IF NOT EXISTS "rebase"`
27
- * unconditionally, so the schema is always in the desired state and the diff is
28
- * empty. (It used to appear only when some collection happened to declare
29
- * `schema: "rebase"` — true for the scaffold's users collection, and not a
30
- * property anything guaranteed.) `db push` additionally excludes the whole
31
- * schema from the declarative apply.
32
- *
33
- * See `@rebasepro/types`' `rls-functions` for why the functions moved out of
34
- * `auth` at all: the short version is that the name was Supabase's, and
35
- * `CREATE OR REPLACE FUNCTION auth.uid() RETURNS text` cannot be applied over
36
- * Supabase's `RETURNS uuid` — Postgres refuses, and the refusal used to be
37
- * swallowed.
38
- */
39
- /**
40
- * The bootstrap as individual statements.
41
- *
42
- * Kept as an array because the two consumers need different shapes and only one
43
- * of them can take a multi-command string: the migration preamble is written to
44
- * a file and replayed by Atlas, but the boot path runs through drizzle, whose
45
- * node-postgres handle speaks the extended query protocol and rejects more than
46
- * one command per call. Splitting a joined string back apart on `$$;` would be
47
- * a parser for a problem that does not need one.
48
- */
49
- export const RLS_BOOTSTRAP_STATEMENTS: readonly string[] = [
50
- `CREATE SCHEMA IF NOT EXISTS ${REBASE_SCHEMA}`,
51
-
52
- // Falls back to the pre-rename `app.user_id` so a database that has taken
53
- // the new schema but is still served by an older backend keeps resolving
54
- // the principal. Drop the COALESCE once no such deployment remains.
55
- `CREATE OR REPLACE FUNCTION ${REBASE_SCHEMA}.uid() RETURNS text AS $$
56
- SELECT COALESCE(
57
- NULLIF(current_setting('app.uid', true), ''),
58
- NULLIF(current_setting('app.user_id', true), '')
59
- );
60
- $$ LANGUAGE sql STABLE`,
61
-
62
- `CREATE OR REPLACE FUNCTION ${REBASE_SCHEMA}.jwt() RETURNS jsonb AS $$
63
- SELECT COALESCE(
64
- NULLIF(current_setting('app.jwt', true), ''),
65
- '{}'
66
- )::jsonb;
67
- $$ LANGUAGE sql STABLE`,
68
-
69
- `CREATE OR REPLACE FUNCTION ${REBASE_SCHEMA}.roles() RETURNS text AS $$
70
- SELECT COALESCE(NULLIF(current_setting('app.user_roles', true), ''), '');
71
- $$ LANGUAGE sql STABLE`
72
- ];
73
-
74
- /** The same statements as one script, for migration files and raw clients. */
75
- export const RLS_BOOTSTRAP_SQL =
76
- "-- Rebase schema + RLS helper functions (required by the policies below)\n" +
77
- RLS_BOOTSTRAP_STATEMENTS.map(s => `${s};`).join("\n\n") + "\n";
78
-
79
- /**
80
- * Removes the pre-1.0 `auth` schema, but only when Rebase is what put it there.
81
- *
82
- * ## Why this is safe against a Supabase database
83
- *
84
- * Two independent guards, and both have to pass:
85
- *
86
- * 1. **Each function is identified before it is dropped.** Ours returns `text`
87
- * and reads the `app.uid` GUC; Supabase's returns `uuid` and reads
88
- * `request.jwt.claims`. Nothing is dropped on a signature we did not write,
89
- * so a Supabase database — where our `CREATE OR REPLACE` could never have
90
- * succeeded in the first place, Postgres refusing to change a return type —
91
- * matches nothing and this is a no-op.
92
- * 2. **`DROP SCHEMA … RESTRICT`**, never CASCADE. If anything else at all still
93
- * lives in `auth` (Supabase's `users` table, its other helpers), the drop
94
- * fails and the schema stays. CASCADE here would be unrecoverable.
95
- *
96
- * ## Why it cannot run too early
97
- *
98
- * Postgres records a dependency from every RLS policy to the functions its body
99
- * calls, so `DROP FUNCTION auth.uid()` fails for as long as a single policy
100
- * still references it. That is the interlock, and it is load-bearing: the drop
101
- * can only succeed once every policy has been recompiled to \`rebase.uid()\`.
102
- * Callers therefore run this *after* applying policies, and treat a failure as
103
- * "not yet — try again next boot" rather than as an error.
104
- */
105
- export const DROP_LEGACY_AUTH_SCHEMA_SQL = `
106
- DO $rebase_drop_legacy$
107
- DECLARE
108
- dropped_any boolean := false;
109
- BEGIN
110
- -- Each function is matched on its own result type and body, so a schema
111
- -- that merely shares the name keeps everything it has.
112
- IF EXISTS (
113
- SELECT 1 FROM pg_proc p JOIN pg_namespace n ON n.oid = p.pronamespace
114
- WHERE n.nspname = 'auth' AND p.proname = 'uid'
115
- AND pg_get_function_result(p.oid) = 'text'
116
- AND p.prosrc LIKE '%app.uid%'
117
- ) THEN
118
- DROP FUNCTION auth.uid();
119
- dropped_any := true;
120
- END IF;
121
-
122
- IF EXISTS (
123
- SELECT 1 FROM pg_proc p JOIN pg_namespace n ON n.oid = p.pronamespace
124
- WHERE n.nspname = 'auth' AND p.proname = 'jwt'
125
- AND pg_get_function_result(p.oid) = 'jsonb'
126
- AND p.prosrc LIKE '%app.jwt%'
127
- ) THEN
128
- DROP FUNCTION auth.jwt();
129
- dropped_any := true;
130
- END IF;
131
-
132
- IF EXISTS (
133
- SELECT 1 FROM pg_proc p JOIN pg_namespace n ON n.oid = p.pronamespace
134
- WHERE n.nspname = 'auth' AND p.proname = 'roles'
135
- AND pg_get_function_result(p.oid) = 'text'
136
- AND p.prosrc LIKE '%app.user_roles%'
137
- ) THEN
138
- DROP FUNCTION auth.roles();
139
- dropped_any := true;
140
- END IF;
141
-
142
- -- RESTRICT: only an empty schema goes. Anything else in there — including a
143
- -- Supabase installation left untouched above — keeps it.
144
- IF dropped_any THEN
145
- BEGIN
146
- EXECUTE 'DROP SCHEMA auth RESTRICT';
147
- EXCEPTION WHEN OTHERS THEN
148
- NULL;
149
- END;
150
- END IF;
151
- END
152
- $rebase_drop_legacy$;
153
- `;
154
-
155
- /** Somebody's policy that still calls a pre-1.0 helper. */
156
- export interface LegacyRlsDependent {
157
- schema: string;
158
- table: string;
159
- policy: string;
160
- }
161
-
162
- /**
163
- * Policies whose body still calls `auth.uid()` / `auth.roles()` / `auth.jwt()`.
164
- *
165
- * Postgres will not drop a function a policy depends on, so this is exactly the
166
- * set standing between a database and losing the legacy schema. Rebase's own
167
- * policies leave the list on the next push or boot, when they are recompiled —
168
- * anything still here afterwards is hand-written, will never be recompiled by
169
- * anybody, and is the reason the drop keeps being skipped. Silence there would
170
- * leave an operator staring at a schema the release notes said would go.
171
- */
172
- export const LEGACY_RLS_DEPENDENTS_SQL = `
173
- SELECT n.nspname AS schema, c.relname AS "table", p.polname AS policy
174
- FROM pg_policy p
175
- JOIN pg_class c ON c.oid = p.polrelid
176
- JOIN pg_namespace n ON n.oid = c.relnamespace
177
- WHERE pg_get_expr(p.polqual, p.polrelid) ~* '\\m${LEGACY_RLS_SCHEMA}\\.(uid|jwt|roles)\\s*\\('
178
- OR pg_get_expr(p.polwithcheck, p.polrelid) ~* '\\m${LEGACY_RLS_SCHEMA}\\.(uid|jwt|roles)\\s*\\('
179
- ORDER BY 1, 2, 3
180
- `;
181
-
182
- /** Somebody's *function* that still calls a pre-1.0 helper from its own body. */
183
- export interface LegacyRlsFunctionDependent {
184
- schema: string;
185
- function: string;
186
- }
187
-
188
- /**
189
- * Functions whose body calls `auth.uid()` / `auth.roles()` / `auth.jwt()`.
190
- *
191
- * This is the half `DROP FUNCTION ... RESTRICT` cannot see, and the reason it
192
- * needs its own query. Postgres records a dependency for a *policy* that calls a
193
- * function, which is why the drop is safe against the policies above — but a
194
- * `LANGUAGE sql` function whose body is a **string literal** is not parsed when
195
- * it is created, so nothing is recorded and `RESTRICT` has nothing to refuse on.
196
- * The drop succeeds and the caller is left pointing at a function that no longer
197
- * exists, which fails at *query* time rather than at boot.
198
- *
199
- * A downstream project building on these helpers is not hypothetical: the Rebase
200
- * control plane defines `auth.is_org_member(uuid)` and `auth.is_org_admin(uuid)`
201
- * in this very schema, each calling `auth.uid()` in a string body, and eleven of
202
- * its row-level-security policies go through them. Every one of those would have
203
- * started failing the first time a recompile left no policy referencing
204
- * `auth.uid()` directly — the drop's own precondition.
205
- *
206
- * Matching on the body text is the only option available, and it is deliberately
207
- * broad: a false positive costs a schema that stays one release longer and says
208
- * why, while a false negative costs somebody their policies.
209
- */
210
- export const LEGACY_RLS_FUNCTION_DEPENDENTS_SQL = `
211
- SELECT n.nspname AS schema, p.proname AS function
212
- FROM pg_proc p
213
- JOIN pg_namespace n ON n.oid = p.pronamespace
214
- WHERE n.nspname NOT IN ('pg_catalog', 'information_schema')
215
- AND NOT (n.nspname = '${LEGACY_RLS_SCHEMA}' AND p.proname IN ('uid', 'jwt', 'roles'))
216
- AND p.prosrc ~* '\\m${LEGACY_RLS_SCHEMA}\\.(uid|jwt|roles)\\s*\\('
217
- ORDER BY 1, 2
218
- `;
219
-
220
- /**
221
- * Retire the pre-1.0 `auth` schema, reporting what is holding it back.
222
- *
223
- * The shared implementation behind the CLI's post-push step and the runtime's
224
- * post-policy step. Both used to just fire {@link DROP_LEGACY_AUTH_SCHEMA_SQL}
225
- * and swallow whatever came back, which is right for the ordinary case — a
226
- * table not recompiled *yet* — and wrong for the one that never resolves: a
227
- * hand-written policy nothing will ever rewrite. Then the schema stays forever
228
- * and nothing ever says why.
229
- */
230
- export async function dropLegacyAuthSchema(
231
- run: (sql: string) => Promise<Record<string, unknown>[]>,
232
- report: { info: (m: string) => void; warn: (m: string) => void }
233
- ): Promise<void> {
234
- let blockers: LegacyRlsDependent[];
235
- try {
236
- blockers = (await run(LEGACY_RLS_DEPENDENTS_SQL)) as unknown as LegacyRlsDependent[];
237
- } catch {
238
- return; // No catalogue access; nothing here is worth failing a boot for.
239
- }
240
-
241
- if (blockers.length > 0) {
242
- report.warn(
243
- `The pre-1.0 \`${LEGACY_RLS_SCHEMA}\` schema cannot be removed yet: ${blockers.length} ` +
244
- `${blockers.length === 1 ? "policy still calls" : "policies still call"} ` +
245
- `\`${LEGACY_RLS_SCHEMA}.uid()\` and friends, and Postgres will not drop a function a policy ` +
246
- `depends on. Rebase's own policies are ` +
247
- `rewritten automatically — anything listed here is hand-written SQL that has to be updated to ` +
248
- `\`${REBASE_SCHEMA}.uid()\` by hand, after which the schema goes on its own:\n` +
249
- blockers.map(b => ` • ${b.schema}.${b.table} → "${b.policy}"`).join("\n")
250
- );
251
- return;
252
- }
253
-
254
- // The half Postgres will not refuse on. See LEGACY_RLS_FUNCTION_DEPENDENTS_SQL:
255
- // a string-literal SQL body records no dependency, so `DROP FUNCTION` drops
256
- // out from under a caller that is still using it and nothing complains until
257
- // a query runs.
258
- let borrowers: LegacyRlsFunctionDependent[];
259
- try {
260
- borrowers = (await run(LEGACY_RLS_FUNCTION_DEPENDENTS_SQL)) as unknown as LegacyRlsFunctionDependent[];
261
- } catch {
262
- return;
263
- }
264
-
265
- if (borrowers.length > 0) {
266
- report.warn(
267
- `The pre-1.0 \`${LEGACY_RLS_SCHEMA}\` schema cannot be removed yet: ${borrowers.length} ` +
268
- `${borrowers.length === 1 ? "function calls" : "functions call"} ` +
269
- `\`${LEGACY_RLS_SCHEMA}.uid()\` and friends from its own body. Postgres records no dependency ` +
270
- `for that — a SQL body written as a string literal is never parsed — so dropping the helpers ` +
271
- `would leave these pointing at nothing, and they would fail when a query reached them rather ` +
272
- `than now. Repoint them at \`${REBASE_SCHEMA}.uid()\`, after which the schema goes on its own:\n` +
273
- borrowers.map(b => ` • ${b.schema}.${b.function}()`).join("\n")
274
- );
275
- return;
276
- }
277
-
278
- try {
279
- await run(DROP_LEGACY_AUTH_SCHEMA_SQL);
280
- } catch (err) {
281
- // Something else depends on it, or the connection does not own it.
282
- // Not fatal: the schema is inert either way now that no policy calls it.
283
- report.info(
284
- `Left the \`${LEGACY_RLS_SCHEMA}\` schema in place: ` +
285
- (err instanceof Error ? err.message : String(err))
286
- );
287
- }
288
- }