@payloadcms/db-postgres 0.1.0-beta.18 → 0.1.0-beta.20

Sign up to get free protection for your applications and to get access to all the features.
@@ -1 +1 @@
1
- {"version":3,"file":"connect.d.ts","sourceRoot":"","sources":["../src/connect.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,kBAAkB,CAAA;AAW/C,eAAO,MAAM,OAAO,EAAE,OA0FrB,CAAA"}
1
+ {"version":3,"file":"connect.d.ts","sourceRoot":"","sources":["../src/connect.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,kBAAkB,CAAA;AAW/C,eAAO,MAAM,OAAO,EAAE,OA+FrB,CAAA"}
package/dist/connect.js CHANGED
@@ -42,7 +42,7 @@ const connect = async function connect(payload) {
42
42
  process.exit(1);
43
43
  }
44
44
  // Only push schema if not in production
45
- if (process.env.NODE_ENV === 'production' || process.env.PAYLOAD_MIGRATING === 'true') return;
45
+ if (process.env.NODE_ENV === 'production' || process.env.PAYLOAD_MIGRATING === 'true' || this.push === false) return;
46
46
  // This will prompt if clarifications are needed for Drizzle to push new schema
47
47
  const { apply, hasDataLoss, statementsToExecute, warnings } = await (0, _utils.pushSchema)(this.schema, this.drizzle);
48
48
  if (warnings.length) {
@@ -88,4 +88,4 @@ const connect = async function connect(payload) {
88
88
  }
89
89
  };
90
90
 
91
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uL3NyYy9jb25uZWN0LnRzIl0sInNvdXJjZXNDb250ZW50IjpbImltcG9ydCB0eXBlIHsgQ29ubmVjdCB9IGZyb20gJ3BheWxvYWQvZGF0YWJhc2UnXG5cbmltcG9ydCB7IHB1c2hTY2hlbWEgfSBmcm9tICdkcml6emxlLWtpdC91dGlscydcbmltcG9ydCB7IGVxLCBzcWwgfSBmcm9tICdkcml6emxlLW9ybSdcbmltcG9ydCB7IGRyaXp6bGUgfSBmcm9tICdkcml6emxlLW9ybS9ub2RlL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ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAA;AAoDvD,eAAO,MAAM,eAAe,EAAE,eA2E7B,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,eA0E7B,CAAA"}
@@ -47,7 +47,7 @@ const getDefaultDrizzleSnapshot = ()=>({
47
47
  tables: {},
48
48
  version: '5'
49
49
  });
50
- const createMigration = async function createMigration(payload, migrationName) {
50
+ const createMigration = async function createMigration({ migrationName, payload }) {
51
51
  const dir = payload.db.migrationDir;
52
52
  if (!_fs.default.existsSync(dir)) {
53
53
  _fs.default.mkdirSync(dir);
@@ -92,4 +92,4 @@ const createMigration = async function createMigration(payload, migrationName) {
92
92
  });
93
93
  };
94
94
 
95
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uL3NyYy9jcmVhdGVNaWdyYXRpb24udHMiXSwic291cmNlc0NvbnRlbnQiOlsiLyogZXNsaW50LWRpc2FibGUgbm8tcmVzdHJpY3RlZC1zeW50YXgsIG5vLWF3YWl0LWluLWxvb3AgKi9cbmltcG9ydCB0eXBlIHsgRHJpenpsZVNuYXBzaG90SlNPTiB9IGZyb20gJ2RyaXp6bGUta2l0L3V0aWxzJ1xuaW1wb3J0IHR5cGUgeyBDcmVhdGVNaWdyYXRpb24gfSBmcm9tICdwYXlsb2FkL2RhdGFiYXNlJ1xuXG5pbXBvcnQgeyBnZW5lcmF0ZURyaXp6bGVKc29uLCBnZW5lcmF0ZU1pZ3JhdGlvbiB9IGZyb20gJ2RyaXp6bGUta2l0L3V0aWxzJ1xuaW1wb3J0IGZzIGZyb20gJ2ZzJ1xuaW1wb3J0IHByb21wdHMgZnJvbSAncHJvbXB0cydcblxuaW1w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version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,IAAI,EAAmB,qBAAqB,EAAE,MAAM,SAAS,CAAA;AAmC3E,YAAY,EAAE,eAAe,EAAE,aAAa,EAAE,MAAM,SAAS,CAAA;AAE7D,wBAAgB,eAAe,CAAC,IAAI,EAAE,IAAI,GAAG,qBAAqB,CA0DjE"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,IAAI,EAAmB,qBAAqB,EAAE,MAAM,SAAS,CAAA;AAmC3E,YAAY,EAAE,eAAe,EAAE,aAAa,EAAE,MAAM,SAAS,CAAA;AAE7D,wBAAgB,eAAe,CAAC,IAAI,EAAE,IAAI,GAAG,qBAAqB,CA2DjE"}
package/dist/index.js CHANGED
@@ -59,6 +59,7 @@ function postgresAdapter(args) {
59
59
  enums: {},
60
60
  pool: undefined,
61
61
  poolOptions: args.pool,
62
+ push: args.push,
62
63
  relations: {},
63
64
  schema: {},
64
65
  sessions: {},
@@ -102,4 +103,4 @@ function postgresAdapter(args) {
102
103
  return adapter;
103
104
  }
104
105
 
105
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uL3NyYy9pbmRleC50cyJdLCJzb3VyY2VzQ29udGVudCI6WyJpbXBvcnQgdHlwZSB7IFBheWxvYWQgfSBmcm9tICdwYXlsb2FkJ1xuXG5pbXBvcnQgcGF0aCBmcm9tICdwYXRoJ1xuaW1wb3J0IHsgY3JlYXRlRGF0YWJhc2VBZGFwdGVyIH0gZnJvbSAncGF5bG9hZC9kYXRhYmFzZSdcblxuaW1wb3J0IHR5cGUgeyBBcmdzLCBQb3N0Z3Jlc0FkYXB0ZXIsIFBvc3RncmVzQWRhcHRlclJlc3VsdCB9IGZyb20gJy4vdHlwZXMnXG5cbmltcG9ydCB7IGNvbm5lY3QgfSBmcm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ts","sourceRoot":"","sources":["../src/init.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,kBAAkB,CAAA;AAW5C,eAAO,MAAM,IAAI,EAAE,IA8DlB,CAAA"}
1
+ {"version":3,"file":"init.d.ts","sourceRoot":"","sources":["../src/init.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,kBAAkB,CAAA;AAW5C,eAAO,MAAM,IAAI,EAAE,IA6DlB,CAAA"}
package/dist/init.js CHANGED
@@ -26,7 +26,6 @@ const init = async function init() {
26
26
  (0, _build.buildTable)({
27
27
  adapter: this,
28
28
  buildRelationships: true,
29
- collectionIndexes: collection.indexes,
30
29
  disableUnique: false,
31
30
  fields: collection.fields,
32
31
  tableName,
@@ -70,4 +69,4 @@ const init = async function init() {
70
69
  });
71
70
  };
72
71
 
73
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uL3NyYy9pbml0LnRzIl0sInNvdXJjZXNDb250ZW50IjpbIi8qIGVzbGludC1kaXNhYmxlIG5vLXBhcmFtLXJlYXNzaWduICovXG5pbXBvcnQgdHlwZSB7IEluaXQgfSBmcm9tICdwYXlsb2FkL2RhdGFiYXNlJ1xuaW1wb3J0IHR5cGUgeyBTYW5pdGl6ZWRDb2xsZWN0aW9uQ29uZmlnIH0gZnJvbSAncGF5bG9hZC90eXBlcydcblxuaW1wb3J0IHsgcGdFbnVtIH0gZnJvbSAnZHJpenpsZS1vcm0vcGctY29yZSdcbmltcG9ydCB7IGJ1aWxkVmVyc2lvbkNvbGxlY3Rpb25GaWVsZHMsIGJ1aWxkVmVyc2lvbkdsb2JhbEZpZWxkcyB9IGZyb20gJ3BheWxvYWQvdmVyc2lvbnMnXG5pbXBvcnQgdG9TbmFrZUNhc2UgZnJvbSAndG8tc25ha2UtY2FzZSdcblxuaW1wb3J0IHR5cGUgeyBQb3N0Z3Jlc0FkYXB0ZXIgfSBm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0FBQztZQUMzQyxNQUFNVyxnQkFBZ0JJLElBQUFBLGtDQUF3QixFQUFDRDtZQUUvQ1gsSUFBQUEsaUJBQVUsRUFBQztnQkFDVEMsU0FBUyxJQUFJO2dCQUNiQyxvQkFBb0I7Z0JBQ3BCQyxlQUFlO2dCQUNmQyxRQUFRSTtnQkFDUlgsV0FBV1U7Z0JBQ1hGLFlBQVk7WUFDZDtRQUNGO0lBQ0Y7QUFDRiJ9
@@ -1 +1 @@
1
- {"version":3,"file":"migrate.d.ts","sourceRoot":"","sources":["../src/migrate.ts"],"names":[],"mappings":"AASA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,SAAS,CAAA;AAK9C,wBAAsB,OAAO,CAAC,IAAI,EAAE,eAAe,GAAG,OAAO,CAAC,IAAI,CAAC,CA8DlE"}
1
+ {"version":3,"file":"migrate.d.ts","sourceRoot":"","sources":["../src/migrate.ts"],"names":[],"mappings":"AASA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,SAAS,CAAA;AAM9C,wBAAsB,OAAO,CAAC,IAAI,EAAE,eAAe,GAAG,OAAO,CAAC,IAAI,CAAC,CA8DlE"}
package/dist/migrate.js CHANGED
@@ -10,10 +10,10 @@ Object.defineProperty(exports, "migrate", {
10
10
  });
11
11
  const _utils = require("drizzle-kit/utils");
12
12
  const _database = require("payload/database");
13
- const _pg = require("pg");
14
13
  const _prompts = /*#__PURE__*/ _interop_require_default(require("prompts"));
15
14
  const _createMigrationTable = require("./utilities/createMigrationTable");
16
15
  const _migrationTableExists = require("./utilities/migrationTableExists");
16
+ const _parseError = require("./utilities/parseError");
17
17
  function _interop_require_default(obj) {
18
18
  return obj && obj.__esModule ? obj : {
19
19
  default: obj
@@ -94,17 +94,11 @@ async function runMigrationFile(payload, migration, batch) {
94
94
  }
95
95
  });
96
96
  } catch (err) {
97
- let msg = `Error running migration ${migration.name}`;
98
- if (err instanceof _pg.DatabaseError) {
99
- msg += `: ${err.message}`;
100
- if (err.hint) msg += `. ${err.hint}`;
101
- }
102
97
  payload.logger.error({
103
98
  err,
104
- msg
99
+ msg: (0, _parseError.parseError)(err, `Error running migration ${migration.name}`)
105
100
  });
106
- throw err;
107
101
  }
108
102
  }
109
103
 
110
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uL3NyYy9taWdyYXRlLnRzIl0sInNvdXJjZXNDb250ZW50IjpbIi8qIGVzbGludC1kaXNhYmxlIG5vLXJlc3RyaWN0ZWQtc3ludGF4LCBuby1hd2FpdC1pbi1sb29wICovXG5pbXBvcnQgdHlwZSB7IFBheWxvYWQgfSBmcm9tICdwYXlsb2FkJ1xuaW1wb3J0IHR5cGUgeyBNaWdyYXRpb24gfSBmcm9tICdwYXlsb2FkL2RhdGFiYXNlJ1xuXG5pbXBvcnQgeyBnZW5lcmF0ZURyaXp6bGVKc29uIH0gZnJvbSAnZHJpenpsZS1raXQvdXRpbHMnXG5pbXBvcnQgeyByZWFkTWlncmF0aW9uRmlsZXMgfSBmcm9tICdwYXlsb2FkL2RhdGFiYXNlJ1xuaW1wb3J0IHsgRGF0YWJhc2VFcnJvciB9IGZyb20gJ3BnJ1xuaW1wb3J0IHByb21wdHMgZnJvbSAncHJvbXB0cydcblxuaW1wb3J0IHR5cGUgeyBQb3N0Z3Jlc0FkYXB0ZXIgfSBmcm9tICcuL3R5cGVzJ1xuXG5pbXBvcnQgeyBjcmVhdGVNaWdyYXRpb25UYWJsZSB9IGZyb20gJy4vdXRpbGl0aWVzL2NyZWF0ZU1pZ3JhdGlvblRhYmxlJ1xuaW1wb3J0IHsgbWlncmF0aW9uVGFibGVFeGlzdHMgfSBmcm9tICcuL3V0aWxpdGllcy9taWdyYXRpb25UYWJsZUV4aXN0cydcblxuZXhwb3J0IGFzeW5jIGZ1bmN0aW9uIG1pZ3JhdGUodGhpczogUG9zdGdyZXNBZGFwdGVyKTogUHJvbWlzZTx2b2lkPiB7XG4gIGNvbnN0IHsgcGF5bG9hZCB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QUFFNUM7UUFBUTtRQUM3QkEsUUFBUUksTUFBTSxDQUFDQyxJQUFJLENBQUM7WUFBRUMsS0FBSyxDQUFDLFdBQVcsRUFBRTBCLFVBQVVSLElBQUksQ0FBQyxFQUFFLEVBQUVhLEtBQUtDLEdBQUcsS0FBS0YsTUFBTSxHQUFHLENBQUM7UUFBQztRQUNwRixNQUFNcEMsUUFBUTZDLE1BQU0sQ0FBQztZQUNuQi9CLFlBQVk7WUFDWmdDLE1BQU07Z0JBQ0p0QixNQUFNUSxVQUFVUixJQUFJO2dCQUNwQk47Z0JBQ0F5QixRQUFRRjtZQUNWO1FBQ0Y7SUFDRixFQUFFLE9BQU9NLEtBQWM7UUFDckIvQyxRQUFRSSxNQUFNLENBQUM0QyxLQUFLLENBQUM7WUFDbkJEO1lBQ0F6QyxLQUFLMkMsSUFBQUEsc0JBQVUsRUFBQ0YsS0FBSyxDQUFDLHdCQUF3QixFQUFFZixVQUFVUixJQUFJLENBQUMsQ0FBQztRQUNsRTtJQUNGO0FBQ0YifQ==
@@ -1 +1 @@
1
- {"version":3,"file":"migrateDown.d.ts","sourceRoot":"","sources":["../src/migrateDown.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,SAAS,CAAA;AAI9C,wBAAsB,WAAW,CAAC,IAAI,EAAE,eAAe,GAAG,OAAO,CAAC,IAAI,CAAC,CA2DtE"}
1
+ {"version":3,"file":"migrateDown.d.ts","sourceRoot":"","sources":["../src/migrateDown.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,SAAS,CAAA;AAK9C,wBAAsB,WAAW,CAAC,IAAI,EAAE,eAAe,GAAG,OAAO,CAAC,IAAI,CAAC,CAwDtE"}
@@ -10,6 +10,7 @@ Object.defineProperty(exports, "migrateDown", {
10
10
  });
11
11
  const _database = require("payload/database");
12
12
  const _migrationTableExists = require("./utilities/migrationTableExists");
13
+ const _parseError = require("./utilities/parseError");
13
14
  async function migrateDown() {
14
15
  const { payload } = this;
15
16
  const migrationFiles = await (0, _database.readMigrationFiles)({
@@ -18,17 +19,16 @@ async function migrateDown() {
18
19
  const { existingMigrations, latestBatch } = await (0, _database.getMigrations)({
19
20
  payload
20
21
  });
21
- const migrationsToRollback = existingMigrations.filter((migration)=>migration.batch === latestBatch && migration.batch !== -1);
22
- if (!migrationsToRollback?.length) {
22
+ if (!existingMigrations?.length) {
23
23
  payload.logger.info({
24
24
  msg: 'No migrations to rollback.'
25
25
  });
26
26
  return;
27
27
  }
28
28
  payload.logger.info({
29
- msg: `Rolling back batch ${latestBatch} consisting of ${migrationsToRollback.length} migration(s).`
29
+ msg: `Rolling back batch ${latestBatch} consisting of ${existingMigrations.length} migration(s).`
30
30
  });
31
- for (const migration of migrationsToRollback){
31
+ for (const migration of existingMigrations){
32
32
  const migrationFile = migrationFiles.find((m)=>m.name === migration.name);
33
33
  if (!migrationFile) {
34
34
  throw new Error(`Migration ${migration.name} not found locally.`);
@@ -61,11 +61,11 @@ async function migrateDown() {
61
61
  await this.rollbackTransaction(transactionID);
62
62
  payload.logger.error({
63
63
  err,
64
- msg: `Error running migration ${migrationFile.name}`
64
+ msg: (0, _parseError.parseError)(err, `Error migrating down ${migrationFile.name}. Rolling back.`)
65
65
  });
66
- throw err;
66
+ process.exit(1);
67
67
  }
68
68
  }
69
69
  }
70
70
 
71
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uL3NyYy9taWdyYXRlRG93bi50cyJdLCJzb3VyY2VzQ29udGVudCI6WyIvKiBlc2xpbnQtZGlzYWJsZSBuby1yZXN0cmljdGVkLXN5bnRheCwgbm8tYXdhaXQtaW4tbG9vcCAqL1xuaW1wb3J0IHR5cGUgeyBQYXlsb2FkUmVxdWVzdCB9IGZyb20gJ3BheWxvYWQvdHlwZXMnXG5cbmltcG9ydCB7IGdldE1pZ3JhdGlvbnMsIHJlYWRNaWdyYXRpb25GaWxlcyB9IG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1 +1 @@
1
- {"version":3,"file":"migrateFresh.d.ts","sourceRoot":"","sources":["../src/migrateFresh.ts"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,SAAS,CAAA;AAE9C;;GAEG;AACH,wBAAsB,YAAY,CAAC,IAAI,EAAE,eAAe,GAAG,OAAO,CAAC,IAAI,CAAC,CA8DvE"}
1
+ {"version":3,"file":"migrateFresh.d.ts","sourceRoot":"","sources":["../src/migrateFresh.ts"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,SAAS,CAAA;AAI9C;;GAEG;AACH,wBAAsB,YAAY,CAAC,IAAI,EAAE,eAAe,GAAG,OAAO,CAAC,IAAI,CAAC,CA6DvE"}
@@ -11,6 +11,7 @@ Object.defineProperty(exports, "migrateFresh", {
11
11
  const _drizzleorm = require("drizzle-orm");
12
12
  const _database = require("payload/database");
13
13
  const _prompts = /*#__PURE__*/ _interop_require_default(require("prompts"));
14
+ const _parseError = require("./utilities/parseError");
14
15
  function _interop_require_default(obj) {
15
16
  return obj && obj.__esModule ? obj : {
16
17
  default: obj
@@ -71,11 +72,10 @@ async function migrateFresh() {
71
72
  await this.rollbackTransaction(transactionID);
72
73
  payload.logger.error({
73
74
  err,
74
- msg: `Error running migration ${migration.name}. Rolling back.`
75
+ msg: (0, _parseError.parseError)(err, `Error running migration ${migration.name}. Rolling back`)
75
76
  });
76
- throw err;
77
77
  }
78
78
  }
79
79
  }
80
80
 
81
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uL3NyYy9taWdyYXRlRnJlc2gudHMiXSwic291cmNlc0NvbnRlbnQiOlsiaW1wb3J0IHR5cGUgeyBQYXlsb2FkUmVxdWVzdCB9IGZyb20gJ3BheWxvYWQvdHlwZXMnXG5cbmltcG9ydCB7IHNxbCB9IGZyb20gJ2RyaXp6bGUtb3JtJ1xuaW1wb3J0IHsgcmVhZE1pZ3JhdG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BQUM7Z0JBQ25CQyxZQUFZO2dCQUNaQyxNQUFNO29CQUNKMUIsTUFBTWtCLFVBQVVsQixJQUFJO29CQUNwQjJCLE9BQU87Z0JBQ1Q7Z0JBQ0FDLEtBQUs7b0JBQ0hYO2dCQUNGO1lBQ0Y7WUFDQSxNQUFNLElBQUksQ0FBQ1ksaUJBQWlCLENBQUNaO1lBRTdCckIsUUFBUVcsTUFBTSxDQUFDQyxJQUFJLENBQUM7Z0JBQUVDLEtBQUssQ0FBQyxXQUFXLEVBQUVTLFVBQVVsQixJQUFJLENBQUMsRUFBRSxFQUFFb0IsS0FBS0MsR0FBRyxLQUFLRixNQUFNLEdBQUcsQ0FBQztZQUFDO1FBQ3RGLEVBQUUsT0FBT1csS0FBYztZQUNyQixNQUFNLElBQUksQ0FBQ0MsbUJBQW1CLENBQUNkO1lBQy9CckIsUUFBUVcsTUFBTSxDQUFDeUIsS0FBSyxDQUFDO2dCQUNuQkY7Z0JBQ0FyQixLQUFLd0IsSUFBQUEsc0JBQVUsRUFBQ0gsS0FBSyxDQUFDLHdCQUF3QixFQUFFWixVQUFVbEIsSUFBSSxDQUFDLGNBQWMsQ0FBQztZQUNoRjtRQUNGO0lBQ0Y7QUFDRiJ9
@@ -1 +1 @@
1
- {"version":3,"file":"migrateRefresh.d.ts","sourceRoot":"","sources":["../src/migrateRefresh.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,SAAS,CAAA;AAI9C;;GAEG;AACH,wBAAsB,cAAc,CAAC,IAAI,EAAE,eAAe,iBAkGzD"}
1
+ {"version":3,"file":"migrateRefresh.d.ts","sourceRoot":"","sources":["../src/migrateRefresh.ts"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,SAAS,CAAA;AAK9C;;GAEG;AACH,wBAAsB,cAAc,CAAC,IAAI,EAAE,eAAe,iBAyFzD"}
@@ -10,6 +10,7 @@ Object.defineProperty(exports, "migrateRefresh", {
10
10
  });
11
11
  const _database = require("payload/database");
12
12
  const _migrationTableExists = require("./utilities/migrationTableExists");
13
+ const _parseError = require("./utilities/parseError");
13
14
  async function migrateRefresh() {
14
15
  const { payload } = this;
15
16
  const migrationFiles = await (0, _database.readMigrationFiles)({
@@ -18,20 +19,19 @@ async function migrateRefresh() {
18
19
  const { existingMigrations, latestBatch } = await (0, _database.getMigrations)({
19
20
  payload
20
21
  });
21
- const migrationsToRollback = existingMigrations.filter((migration)=>migration.batch === latestBatch && migration.batch !== -1);
22
- if (!migrationsToRollback?.length) {
22
+ if (!existingMigrations?.length) {
23
23
  payload.logger.info({
24
24
  msg: 'No migrations to rollback.'
25
25
  });
26
26
  return;
27
27
  }
28
28
  payload.logger.info({
29
- msg: `Rolling back batch ${latestBatch} consisting of ${migrationsToRollback.length} migration(s).`
29
+ msg: `Rolling back batch ${latestBatch} consisting of ${existingMigrations.length} migration(s).`
30
30
  });
31
31
  let transactionID;
32
32
  // Reverse order of migrations to rollback
33
- migrationsToRollback.reverse();
34
- for (const migration of migrationsToRollback){
33
+ existingMigrations.reverse();
34
+ for (const migration of existingMigrations){
35
35
  try {
36
36
  const migrationFile = migrationFiles.find((m)=>m.name === migration.name);
37
37
  if (!migrationFile) {
@@ -64,15 +64,11 @@ async function migrateRefresh() {
64
64
  }
65
65
  } catch (err) {
66
66
  await this.rollbackTransaction(transactionID);
67
- let msg = `Error running migration ${migration.name}. Rolling back.`;
68
- if (err instanceof Error) {
69
- msg += ` ${err.message}`;
70
- }
71
67
  payload.logger.error({
72
68
  err,
73
- msg
69
+ msg: (0, _parseError.parseError)(err, `Error running migration ${migration.name}. Rolling back.`)
74
70
  });
75
- throw err;
71
+ process.exit(1);
76
72
  }
77
73
  }
78
74
  // Run all migrate up
@@ -104,11 +100,10 @@ async function migrateRefresh() {
104
100
  await this.rollbackTransaction(transactionID);
105
101
  payload.logger.error({
106
102
  err,
107
- msg: `Error running migration ${migration.name}. Rolling back.`
103
+ msg: (0, _parseError.parseError)(err, `Error running migration ${migration.name}. Rolling back.`)
108
104
  });
109
- throw err;
110
105
  }
111
106
  }
112
107
  }
113
108
 
114
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uL3NyYy9taWdyYXRlUmVmcmVzaC50cyJdLCJzb3VyY2VzQ29udGVudCI6WyIvKiBlc2xpbnQtZGlzYWJsZSBuby1yZXN0cmljdGVkLXN5bnRheCwgbm8tYXdhaXQtaW4tbG9vcCAqL1xuaW1wb3J0IHR5cGUgeyBQYXlsb2FkUmVxdWVzdCB9IGZyb20gJ3BheWxvYWQvdHlwZXMnXG5cbmltcG9ydCB7IGdldE1pZ3JhdGlvbnMsIHJlYWRNaWdyYXRpb25GaWxlcyB9IGZyb20gJ3BheWxvYWQvZGF0YWJhc2UnXG5cbmltcG9ydCB0eXBlIHsgUG9zdGdyZXNBZGFwdGVyIH0gZnJvbSAnLi90eXBlcydcblxuaW1wb3J0IHsgbWlncmF0aW9uVGFibGVFeGlzdHMgfSBmcm9tICcuL3V0aWxpdGllcy9taWdyYXRpb25UYWJsZUV4aXN0cydcblxuLyoqXG4gKiBSdW4gYWxsIG1pZ3JhdGlvbiBkb3duIGZ1bmN0aW9ucyBiZWZvcmUgcnVubmluZyB1cFxuICovXG5leHBvcnQgYXN5bmMgZnVuY3Rpb24gbWlncmF0ZVJlZnJlc2godGhpczogUG9zdGdyZXNBZGFwdGVyKSB7XG4gIGNvbnN0IHsgcGF5bG9hZCB9ID0gdGhpc1xuICBjb25zdCBtaWdyYXRpb25GaWxlcyA9IGF3YWl0IHJlYWRNaWdyYXRpb25GaWxlcyh7IHBheWxvYWQgfSlcblxuICBjb25zdCB7IGV4aXN0aW5nTWlncmF0aW9ucywgbGF0ZXN0QmF0Y2ggfSA9IGF3YWl0IGdldE1pZ3JhdGlvbnMoe1xuICAgIHBheWxvYWQsXG4gIH0pXG5cbiAgY29uc3QgbWlncmF0aW9uc1RvUm9sbGJhY2sgPSBleGlzdGlu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RTyxNQUFNLENBQUNDLElBQUksQ0FBQztnQkFBRUMsS0FBSyxDQUFDLFdBQVcsRUFBRUcsVUFBVUksSUFBSSxDQUFDLEVBQUUsRUFBRUcsS0FBS0MsR0FBRyxLQUFLRixNQUFNLEdBQUcsQ0FBQztZQUFDO1FBQ3RGLEVBQUUsT0FBT2EsS0FBYztZQUNyQixNQUFNLElBQUksQ0FBQ0MsbUJBQW1CLENBQUN0QjtZQUMvQlYsUUFBUU8sTUFBTSxDQUFDMEIsS0FBSyxDQUFDO2dCQUNuQkY7Z0JBQ0F0QixLQUFLeUIsSUFBQUEsc0JBQVUsRUFBQ0gsS0FBSyxDQUFDLHdCQUF3QixFQUFFbkIsVUFBVUksSUFBSSxDQUFDLGVBQWUsQ0FBQztZQUNqRjtRQUNGO0lBQ0Y7QUFDRiJ9
@@ -1 +1 @@
1
- {"version":3,"file":"migrateReset.d.ts","sourceRoot":"","sources":["../src/migrateReset.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,SAAS,CAAA;AAI9C;;GAEG;AACH,wBAAsB,YAAY,CAAC,IAAI,EAAE,eAAe,GAAG,OAAO,CAAC,IAAI,CAAC,CAoEvE"}
1
+ {"version":3,"file":"migrateReset.d.ts","sourceRoot":"","sources":["../src/migrateReset.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,SAAS,CAAA;AAI9C;;GAEG;AACH,wBAAsB,YAAY,CAAC,IAAI,EAAE,eAAe,GAAG,OAAO,CAAC,IAAI,CAAC,CAwEvE"}
@@ -26,13 +26,13 @@ async function migrateReset() {
26
26
  }
27
27
  // Rollback all migrations in order
28
28
  for (const migration of existingMigrations){
29
- const migrationFile = migrationFiles.find((m)=>m.name === migration.name);
30
- if (!migrationFile) {
31
- throw new Error(`Migration ${migration.name} not found locally.`);
32
- }
33
- const start = Date.now();
34
29
  let transactionID;
30
+ const migrationFile = migrationFiles.find((m)=>m.name === migration.name);
35
31
  try {
32
+ if (!migrationFile) {
33
+ throw new Error(`Migration ${migration.name} not found locally.`);
34
+ }
35
+ const start = Date.now();
36
36
  payload.logger.info({
37
37
  msg: `Migrating down: ${migrationFile.name}`
38
38
  });
@@ -55,12 +55,14 @@ async function migrateReset() {
55
55
  }
56
56
  await this.commitTransaction(transactionID);
57
57
  } catch (err) {
58
+ let msg = `Error running migration ${migrationFile.name}.`;
59
+ if (err instanceof Error) msg += ` ${err.message}`;
58
60
  await this.rollbackTransaction(transactionID);
59
61
  payload.logger.error({
60
62
  err,
61
- msg: `Error running migration ${migrationFile.name}`
63
+ msg
62
64
  });
63
- throw err;
65
+ process.exit(1);
64
66
  }
65
67
  }
66
68
  // Delete dev migration
@@ -84,4 +86,4 @@ async function migrateReset() {
84
86
  }
85
87
  }
86
88
 
87
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uL3NyYy9taWdyYXRlUmVzZXQudHMiXSwic291cmNlc0NvbnRlbnQiOlsiLyogZXNsaW50LWRpc2FibGUgbm8tcmVzdHJpY3RlZC1zeW50YXgsIG5vLWF3YWl0LWluLWxvb3AgKi9cbmltcG9ydCB0eXBlIHsgUGF5bG9hZFJlcXVlc3QgfSBmcm9tICdwYXlsb2FkL3R5cGVzJ1xuXG5pbXBvcnQgeyBnZXRNaWdyYXRpb25zLCByZWFkTWlncmF0aW9uRmlsZXMgfSBmcm9tICdwYXlsb2FkL2RhdGFiYXNlJ1xuXG5pbXBvcnQgdHlwZSB7IFBvc3RncmVzQWRhcHRlciB9IGZyb20gJy4vdHlwZXMnXG5cbmltcG9ydCB7IG1pZ3JhdGlvblRhYmxlRXhpc3RzIH0gZnJvbSAnLi91dGlsaXRpZXMvbWlncmF0aW9uVGFibGVFeGlzdHMnXG5cbi8qKlxuICogUnVuIGFsbCBtaWdyYXRlIGRvd24gZnVuY3Rpb25zXG4gKi9cbmV4cG9ydCBhc3luYyBmdW5jdGlvbiBtaWdyYXRl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xJQUFJLENBQUNrQixpQkFBaUIsQ0FBQ2xCO1FBQy9CLEVBQUUsT0FBT21CLEtBQWM7WUFDckIsSUFBSXJCLE1BQU0sQ0FBQyx3QkFBd0IsRUFBRUcsY0FBY0csSUFBSSxDQUFDLENBQUMsQ0FBQztZQUUxRCxJQUFJZSxlQUFlZCxPQUFPUCxPQUFPLENBQUMsQ0FBQyxFQUFFcUIsSUFBSUMsT0FBTyxDQUFDLENBQUM7WUFFbEQsTUFBTSxJQUFJLENBQUNDLG1CQUFtQixDQUFDckI7WUFDL0JWLFFBQVFNLE1BQU0sQ0FBQzBCLEtBQUssQ0FBQztnQkFDbkJIO2dCQUNBckI7WUFDRjtZQUNBeUIsUUFBUUMsSUFBSSxDQUFDO1FBQ2Y7SUFDRjtJQUVBLHVCQUF1QjtJQUV2QixNQUFNYixjQUFjLE1BQU1DLElBQUFBLDBDQUFvQixFQUFDLElBQUksQ0FBQ0MsT0FBTztJQUMzRCxJQUFJRixhQUFhO1FBQ2YsSUFBSTtZQUNGLE1BQU1yQixRQUFRd0IsTUFBTSxDQUFDO2dCQUNuQkUsWUFBWTtnQkFDWlMsT0FBTztvQkFDTEMsT0FBTzt3QkFDTEMsUUFBUSxDQUFDO29CQUNYO2dCQUNGO1lBQ0Y7UUFDRixFQUFFLE9BQU9SLEtBQWM7WUFDckI3QixRQUFRTSxNQUFNLENBQUMwQixLQUFLLENBQUM7Z0JBQUVBLE9BQU9IO2dCQUFLckIsS0FBSztZQUErQjtRQUN6RTtJQUNGO0FBQ0YifQ==
@@ -1,15 +1,15 @@
1
1
  import type { IndexBuilder, PgColumnBuilder, UniqueConstraintBuilder } from 'drizzle-orm/pg-core';
2
- import type { Field, SanitizedCollectionConfig } from 'payload/types';
2
+ import type { Field } from 'payload/types';
3
3
  import type { GenericColumns, PostgresAdapter } from '../types';
4
4
  type Args = {
5
5
  adapter: PostgresAdapter;
6
6
  baseColumns?: Record<string, PgColumnBuilder>;
7
7
  baseExtraConfig?: Record<string, (cols: GenericColumns) => IndexBuilder | UniqueConstraintBuilder>;
8
8
  buildRelationships?: boolean;
9
- collectionIndexes?: SanitizedCollectionConfig['indexes'];
10
9
  disableUnique: boolean;
11
10
  fields: Field[];
12
11
  rootRelationsToBuild?: Map<string, string>;
12
+ rootRelationships?: Set<string>;
13
13
  rootTableIDColType?: string;
14
14
  rootTableName?: string;
15
15
  tableName: string;
@@ -18,6 +18,6 @@ type Args = {
18
18
  type Result = {
19
19
  relationsToBuild: Map<string, string>;
20
20
  };
21
- export declare const buildTable: ({ adapter, baseColumns, baseExtraConfig, buildRelationships, collectionIndexes, disableUnique, fields, rootRelationsToBuild, rootTableIDColType, rootTableName, tableName, timestamps, }: Args) => Result;
21
+ export declare const buildTable: ({ adapter, baseColumns, baseExtraConfig, buildRelationships, disableUnique, fields, rootRelationsToBuild, rootRelationships, rootTableIDColType, rootTableName, tableName, timestamps, }: Args) => Result;
22
22
  export {};
23
23
  //# sourceMappingURL=build.d.ts.map