@axiom-lattice/pg-stores 1.0.84 → 1.0.85
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/.turbo/turbo-build.log +8 -8
- package/CHANGELOG.md +10 -0
- package/dist/index.js +5 -0
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +5 -0
- package/dist/index.mjs.map +1 -1
- package/package.json +3 -3
- package/src/migrations/migration.ts +9 -0
package/dist/index.mjs
CHANGED
|
@@ -57,6 +57,11 @@ var MigrationManager = class {
|
|
|
57
57
|
const pkColumn = pkCheck.rows[0]?.column_name;
|
|
58
58
|
const constraintName = pkCheck.rows[0]?.constraint_name;
|
|
59
59
|
if (pkColumn === "version" && constraintName) {
|
|
60
|
+
await client.query(`
|
|
61
|
+
DELETE FROM lattice_schema_migrations a
|
|
62
|
+
USING lattice_schema_migrations b
|
|
63
|
+
WHERE a.name = b.name AND a.version < b.version
|
|
64
|
+
`);
|
|
60
65
|
await client.query(
|
|
61
66
|
`ALTER TABLE lattice_schema_migrations DROP CONSTRAINT ${constraintName}`
|
|
62
67
|
);
|