latticesql 1.8.0 → 1.8.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.
- package/dist/cli.js +4 -2
- package/dist/index.cjs +4 -2
- package/dist/index.d.cts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +4 -2
- package/package.json +1 -1
package/dist/cli.js
CHANGED
|
@@ -1082,7 +1082,7 @@ var SchemaManager = class {
|
|
|
1082
1082
|
* connection so the BEGIN/COMMIT lifecycle is atomic against pgbouncer
|
|
1083
1083
|
* transaction-mode pooling.
|
|
1084
1084
|
*
|
|
1085
|
-
* On Postgres, also acquires `
|
|
1085
|
+
* On Postgres, also acquires `pg_advisory_xact_lock` at the top of the
|
|
1086
1086
|
* transaction so concurrent app boots (Railway rolling deploys, two
|
|
1087
1087
|
* developer laptops booting against a shared dev DB) queue on the lock
|
|
1088
1088
|
* and apply migrations serially. The lock is transaction-scoped so it
|
|
@@ -1111,7 +1111,9 @@ var SchemaManager = class {
|
|
|
1111
1111
|
});
|
|
1112
1112
|
await adapter.withClient(async (tx) => {
|
|
1113
1113
|
if (adapter.dialect === "postgres") {
|
|
1114
|
-
await tx.run("SELECT
|
|
1114
|
+
await tx.run("SELECT pg_advisory_xact_lock($1::bigint)", [
|
|
1115
|
+
LATTICE_MIGRATION_LOCK_ID.toString()
|
|
1116
|
+
]);
|
|
1115
1117
|
}
|
|
1116
1118
|
for (const m of sorted) {
|
|
1117
1119
|
const versionStr = String(m.version);
|
package/dist/index.cjs
CHANGED
|
@@ -826,7 +826,7 @@ var SchemaManager = class {
|
|
|
826
826
|
* connection so the BEGIN/COMMIT lifecycle is atomic against pgbouncer
|
|
827
827
|
* transaction-mode pooling.
|
|
828
828
|
*
|
|
829
|
-
* On Postgres, also acquires `
|
|
829
|
+
* On Postgres, also acquires `pg_advisory_xact_lock` at the top of the
|
|
830
830
|
* transaction so concurrent app boots (Railway rolling deploys, two
|
|
831
831
|
* developer laptops booting against a shared dev DB) queue on the lock
|
|
832
832
|
* and apply migrations serially. The lock is transaction-scoped so it
|
|
@@ -855,7 +855,9 @@ var SchemaManager = class {
|
|
|
855
855
|
});
|
|
856
856
|
await adapter.withClient(async (tx) => {
|
|
857
857
|
if (adapter.dialect === "postgres") {
|
|
858
|
-
await tx.run("SELECT
|
|
858
|
+
await tx.run("SELECT pg_advisory_xact_lock($1::bigint)", [
|
|
859
|
+
LATTICE_MIGRATION_LOCK_ID.toString()
|
|
860
|
+
]);
|
|
859
861
|
}
|
|
860
862
|
for (const m of sorted) {
|
|
861
863
|
const versionStr = String(m.version);
|
package/dist/index.d.cts
CHANGED
|
@@ -45,7 +45,7 @@ declare function writeManifest(outputDir: string, manifest: LatticeManifest): vo
|
|
|
45
45
|
|
|
46
46
|
/**
|
|
47
47
|
* Adapter dialect identifier. Used by callers that need to issue
|
|
48
|
-
* dialect-specific SQL (e.g. the migration runner's `
|
|
48
|
+
* dialect-specific SQL (e.g. the migration runner's `pg_advisory_xact_lock`
|
|
49
49
|
* on Postgres). Lattice itself uses this only for cross-dialect concerns
|
|
50
50
|
* the dialect-translation layer can't paper over — most application code
|
|
51
51
|
* should never need to branch on it.
|
package/dist/index.d.ts
CHANGED
|
@@ -45,7 +45,7 @@ declare function writeManifest(outputDir: string, manifest: LatticeManifest): vo
|
|
|
45
45
|
|
|
46
46
|
/**
|
|
47
47
|
* Adapter dialect identifier. Used by callers that need to issue
|
|
48
|
-
* dialect-specific SQL (e.g. the migration runner's `
|
|
48
|
+
* dialect-specific SQL (e.g. the migration runner's `pg_advisory_xact_lock`
|
|
49
49
|
* on Postgres). Lattice itself uses this only for cross-dialect concerns
|
|
50
50
|
* the dialect-translation layer can't paper over — most application code
|
|
51
51
|
* should never need to branch on it.
|
package/dist/index.js
CHANGED
|
@@ -768,7 +768,7 @@ var SchemaManager = class {
|
|
|
768
768
|
* connection so the BEGIN/COMMIT lifecycle is atomic against pgbouncer
|
|
769
769
|
* transaction-mode pooling.
|
|
770
770
|
*
|
|
771
|
-
* On Postgres, also acquires `
|
|
771
|
+
* On Postgres, also acquires `pg_advisory_xact_lock` at the top of the
|
|
772
772
|
* transaction so concurrent app boots (Railway rolling deploys, two
|
|
773
773
|
* developer laptops booting against a shared dev DB) queue on the lock
|
|
774
774
|
* and apply migrations serially. The lock is transaction-scoped so it
|
|
@@ -797,7 +797,9 @@ var SchemaManager = class {
|
|
|
797
797
|
});
|
|
798
798
|
await adapter.withClient(async (tx) => {
|
|
799
799
|
if (adapter.dialect === "postgres") {
|
|
800
|
-
await tx.run("SELECT
|
|
800
|
+
await tx.run("SELECT pg_advisory_xact_lock($1::bigint)", [
|
|
801
|
+
LATTICE_MIGRATION_LOCK_ID.toString()
|
|
802
|
+
]);
|
|
801
803
|
}
|
|
802
804
|
for (const m of sorted) {
|
|
803
805
|
const versionStr = String(m.version);
|
package/package.json
CHANGED