@secondlayer/shared 6.40.0 → 6.40.1
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.
|
@@ -1,19 +1,28 @@
|
|
|
1
1
|
import { type Kysely, sql } from "kysely";
|
|
2
|
+
import { onControlPlane } from "../src/db/migration-role.ts";
|
|
2
3
|
|
|
3
4
|
/**
|
|
4
5
|
* Opt-out toggle for the subgraph reindex-completion email. Defaults to true —
|
|
5
6
|
* reindex completion is rare and high-value (the customer explicitly triggered
|
|
6
7
|
* a wait), unlike a recurring digest that would want opt-in.
|
|
8
|
+
*
|
|
9
|
+
* `accounts` is control-plane (TARGET) only under the source/target split —
|
|
10
|
+
* gate with `onControlPlane` so this is a no-op (not a failure) on SOURCE,
|
|
11
|
+
* which doesn't have the table.
|
|
7
12
|
*/
|
|
8
13
|
export async function up(db: Kysely<unknown>): Promise<void> {
|
|
9
|
-
await
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
14
|
+
await onControlPlane(async () => {
|
|
15
|
+
await sql`
|
|
16
|
+
ALTER TABLE accounts
|
|
17
|
+
ADD COLUMN IF NOT EXISTS notify_reindex_complete boolean NOT NULL DEFAULT true
|
|
18
|
+
`.execute(db);
|
|
19
|
+
});
|
|
13
20
|
}
|
|
14
21
|
|
|
15
22
|
export async function down(db: Kysely<unknown>): Promise<void> {
|
|
16
|
-
await
|
|
17
|
-
|
|
18
|
-
|
|
23
|
+
await onControlPlane(async () => {
|
|
24
|
+
await sql`
|
|
25
|
+
ALTER TABLE accounts DROP COLUMN IF EXISTS notify_reindex_complete
|
|
26
|
+
`.execute(db);
|
|
27
|
+
});
|
|
19
28
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@secondlayer/shared",
|
|
3
|
-
"version": "6.40.
|
|
3
|
+
"version": "6.40.1",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -167,7 +167,7 @@
|
|
|
167
167
|
"prepublishOnly": "bun run build"
|
|
168
168
|
},
|
|
169
169
|
"dependencies": {
|
|
170
|
-
"@secondlayer/stacks": "^2.
|
|
170
|
+
"@secondlayer/stacks": "^2.10.0",
|
|
171
171
|
"kysely": "0.28.15",
|
|
172
172
|
"kysely-postgres-js": "3.0.0",
|
|
173
173
|
"postgres": "^3.4.6",
|