@payloadcms/db-postgres 0.8.8 → 0.8.9

Sign up to get free protection for your applications and to get access to all the features.
@@ -1 +1 @@
1
- {"version":3,"file":"createMigration.d.ts","sourceRoot":"","sources":["../src/createMigration.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAA;AAoDvD,eAAO,MAAM,eAAe,EAAE,eAkF7B,CAAA"}
1
+ {"version":3,"file":"createMigration.d.ts","sourceRoot":"","sources":["../src/createMigration.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAA;AAoDvD,eAAO,MAAM,eAAe,EAAE,eAuF7B,CAAA"}
@@ -52,7 +52,7 @@ const createMigration = async function createMigration({ forceAcceptWarning, mig
52
52
  if (!_fs.default.existsSync(dir)) {
53
53
  _fs.default.mkdirSync(dir);
54
54
  }
55
- const { generateDrizzleJson, generateMigration } = require('drizzle-kit/api');
55
+ const { generateDrizzleJson, generateMigration, upPgSnapshot } = require('drizzle-kit/api');
56
56
  const [yyymmdd, hhmmss] = new Date().toISOString().split('T');
57
57
  const formattedDate = yyymmdd.replace(/\D/g, '');
58
58
  const formattedTime = hhmmss.split('.')[0].replace(/\D/g, '');
@@ -72,6 +72,9 @@ const createMigration = async function createMigration({ forceAcceptWarning, mig
72
72
  drizzleJsonBefore = latestSnapshotJSON;
73
73
  }
74
74
  const drizzleJsonAfter = generateDrizzleJson(this.schema);
75
+ if (drizzleJsonBefore.version < drizzleJsonAfter.version) {
76
+ drizzleJsonBefore = upPgSnapshot(drizzleJsonBefore);
77
+ }
75
78
  const sqlStatementsUp = await generateMigration(drizzleJsonBefore, drizzleJsonAfter);
76
79
  const sqlStatementsDown = await generateMigration(drizzleJsonAfter, drizzleJsonBefore);
77
80
  if (!sqlStatementsUp.length && !sqlStatementsDown.length && !forceAcceptWarning) {
@@ -98,4 +101,4 @@ const createMigration = async function createMigration({ forceAcceptWarning, mig
98
101
  });
99
102
  };
100
103
 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EJyQyxrQkFDRXFELGdCQUFnQkUsTUFBTSxHQUFHRixpQkFBaUJlLEtBQUssUUFBUUMsV0FDdkRmLGtCQUFrQkMsTUFBTSxHQUFHRCxtQkFBbUJjLEtBQUssUUFBUUM7SUFHL0RyRCxRQUFRc0QsTUFBTSxDQUFDQyxJQUFJLENBQUM7UUFBRUMsS0FBSyxDQUFDLHFCQUFxQixFQUFFbkMsU0FBUyxHQUFHLENBQUM7SUFBQztBQUNuRSJ9
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@payloadcms/db-postgres",
3
- "version": "0.8.8",
3
+ "version": "0.8.9",
4
4
  "description": "The officially supported Postgres database adapter for Payload",
5
5
  "repository": {
6
6
  "type": "git",
@@ -30,7 +30,7 @@
30
30
  "@types/pg": "8.10.2",
31
31
  "@types/to-snake-case": "1.0.0",
32
32
  "@payloadcms/eslint-config": "1.1.1",
33
- "payload": "2.30.2"
33
+ "payload": "2.30.3"
34
34
  },
35
35
  "peerDependencies": {
36
36
  "payload": "^2.0.0"