@coffre/db 0.1.11 → 0.1.12
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.
- package/dist/connect.d.ts +1 -1
- package/dist/{database-BhLco7OA.d.ts → database-CNMfHZwF.d.ts} +1 -1
- package/dist/dialect.d.ts +1 -1
- package/dist/hyperdrive.d.ts +1 -1
- package/dist/index.d.ts +2 -2
- package/dist/log.d.ts +1 -1
- package/dist/migrations/postgres/0001_remove_syncs.sql +13 -0
- package/dist/migrations/postgres/meta/0001_snapshot.json +1707 -0
- package/dist/migrations/postgres/meta/_journal.json +7 -0
- package/dist/migrations/sqlite/0001_remove_syncs.sql +13 -0
- package/dist/migrations/sqlite/meta/0001_snapshot.json +1575 -0
- package/dist/migrations/sqlite/meta/_journal.json +7 -0
- package/dist/portable.d.ts +2 -2
- package/dist/{relations-DqgxtlKu.js → relations-BfR3JjT1.js} +2 -22
- package/dist/{schema-Cd4WOnB5.d.ts → schema-AmvM6w0D.d.ts} +2 -362
- package/dist/schema-sqlite.d.ts +1 -369
- package/dist/schema-sqlite.js +5 -59
- package/dist/schema-version.d.ts +5 -3
- package/dist/schema-version.js +4 -2
- package/dist/schema.d.ts +2 -2
- package/dist/schema.js +5 -79
- package/package.json +2 -2
- package/src/baseline.ts +11 -19
- package/src/migrations/postgres/0001_remove_syncs.sql +13 -0
- package/src/migrations/postgres/meta/0001_snapshot.json +1707 -0
- package/src/migrations/postgres/meta/_journal.json +7 -0
- package/src/migrations/sqlite/0001_remove_syncs.sql +13 -0
- package/src/migrations/sqlite/meta/0001_snapshot.json +1575 -0
- package/src/migrations/sqlite/meta/_journal.json +7 -0
- package/src/relations.ts +1 -14
- package/src/schema-version.ts +4 -2
- package/src/schema.sqlite.ts +1 -65
- package/src/schema.ts +1 -81
package/dist/connect.d.ts
CHANGED
package/dist/dialect.d.ts
CHANGED
package/dist/hyperdrive.d.ts
CHANGED
package/dist/index.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { l as schema_d_exports } from "./schema-
|
|
2
|
-
import { a as Transaction, c as tablesOf, i as Queryable, n as PoolLike, o as createDatabase, r as QueryOutsideTransaction, s as own, t as Database } from "./database-
|
|
1
|
+
import { l as schema_d_exports } from "./schema-AmvM6w0D.js";
|
|
2
|
+
import { a as Transaction, c as tablesOf, i as Queryable, n as PoolLike, o as createDatabase, r as QueryOutsideTransaction, s as own, t as Database } from "./database-CNMfHZwF.js";
|
|
3
3
|
export { Database, PoolLike, QueryOutsideTransaction, Queryable, Transaction, createDatabase, own, schema_d_exports as schema, tablesOf };
|
package/dist/log.d.ts
CHANGED
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
-- Stop old app instances before upgrading. Never silently discard a configured
|
|
2
|
+
-- destination, including archived ones. Keep the audit and sealed legacy rows.
|
|
3
|
+
LOCK TABLE syncs, sync_keys IN ACCESS EXCLUSIVE MODE;
|
|
4
|
+
--> statement-breakpoint
|
|
5
|
+
DO $$ BEGIN
|
|
6
|
+
IF EXISTS (SELECT 1 FROM syncs) OR EXISTS (SELECT 1 FROM sync_keys) THEN
|
|
7
|
+
RAISE EXCEPTION 'syncs are removed: migrate destinations to service tokens, back up and clear syncs and sync_keys before upgrading';
|
|
8
|
+
END IF;
|
|
9
|
+
END $$;
|
|
10
|
+
--> statement-breakpoint
|
|
11
|
+
DROP TABLE sync_keys;
|
|
12
|
+
--> statement-breakpoint
|
|
13
|
+
DROP TABLE syncs;
|