@payloadcms/db-postgres 0.1.0-beta.1 → 0.1.0-beta.6

Sign up to get free protection for your applications and to get access to all the features.
package/dist/connect.js CHANGED
@@ -27,36 +27,38 @@ const connect = async function connect(payload) {
27
27
  try {
28
28
  this.pool = new _pg.Pool(this.client);
29
29
  await this.pool.connect();
30
- this.db = (0, _nodepostgres.drizzle)(this.pool, {
30
+ this.drizzle = (0, _nodepostgres.drizzle)(this.pool, {
31
31
  schema: this.schema
32
32
  });
33
33
  if (process.env.PAYLOAD_DROP_DATABASE === 'true') {
34
34
  this.payload.logger.info('---- DROPPING TABLES ----');
35
- await this.db.execute((0, _drizzleorm.sql)`drop schema public cascade;\ncreate schema public;`);
35
+ await this.drizzle.execute((0, _drizzleorm.sql)`drop schema public cascade;\ncreate schema public;`);
36
36
  this.payload.logger.info('---- DROPPED TABLES ----');
37
37
  }
38
38
  } catch (err) {
39
39
  payload.logger.error(`Error: cannot connect to Postgres. Details: ${err.message}`, err);
40
40
  process.exit(1);
41
41
  }
42
- this.payload.logger.info('Connected to Postgres successfully');
42
+ // TODO: Bring this log back once we figure out logging issues
43
+ // this.payload.logger.info('Connected to Postgres successfully')
43
44
  // Only push schema if not in production
44
45
  if (process.env.NODE_ENV === 'production' || process.env.PAYLOAD_MIGRATING === 'true') return;
45
46
  // This will prompt if clarifications are needed for Drizzle to push new schema
46
- const { apply, hasDataLoss, statementsToExecute, warnings } = await (0, _utils.pushSchema)(this.schema, this.db);
47
- this.payload.logger.debug({
48
- hasDataLoss,
49
- msg: 'Schema push results',
50
- statementsToExecute,
51
- warnings
52
- });
47
+ const { apply, hasDataLoss, statementsToExecute, warnings } = await (0, _utils.pushSchema)(this.schema, this.drizzle);
48
+ // this.payload.logger.debug({
49
+ // hasDataLoss,
50
+ // msg: 'Schema push results',
51
+ // statementsToExecute,
52
+ // warnings,
53
+ // })
53
54
  if (warnings.length) {
54
- this.payload.logger.warn({
55
+ console.log({
55
56
  msg: `Warnings detected during schema push: ${warnings.join('\n')}`,
56
57
  warnings
57
58
  });
58
59
  if (hasDataLoss) {
59
- this.payload.logger.warn({
60
+ // TODO: Bring this log back once we figure out logging issues
61
+ console.log({
60
62
  msg: 'DATA LOSS WARNING: Possible data loss detected if schema is pushed.'
61
63
  });
62
64
  }
@@ -79,4 +81,4 @@ const connect = async function connect(payload) {
79
81
  await apply();
80
82
  };
81
83
 
82
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uL3NyYy9jb25uZWN0LnRzIl0sInNvdXJjZXNDb250ZW50IjpbImltcG9ydCB0eXBlIHsgQ29ubmVjdCB9IGZyb20gJ3BheWxvYWQvZGF0YWJhc2UnXG5cbmltcG9ydCB7IHB1c2hTY2hlbWEgfSBmcm9tICdkcml6emxlLWtpdC91dGlscydcbmltcG9ydCB7IHNxbCB9IGZyb20gJ2RyaXp6bGUtb3JtJ1xuaW1wb3J0IHsgZHJpenpsZSB9IGZyb20gJ2RyaXp6bGUtb3JtL25vZGUtcG9zdGdyZXMnXG5pbXBvcnQgeyBQb29sIH0gZnJvbSAncGcnXG5pbXBvcnQgcHJvbXB0cyBmcm9tICdwcm9tcHRzJ1xuXG5pbXBvcnQgdHlwZSB7IFBvc3RncmVzQWRhcHRlciB9IGZyb20gJy4vdHlwZXMnXG5cbmV4cG9ydCBjb25zdCBjb25uZWN0OiBDb25uZWN0ID0gYXN5bmMgZnVuY3Rpb24gY29ubmVjdCh0aGlzOiBQb3N0Z3Jlc0FkYXB0ZXIsIHBheWxvYWQpIHtcbiAgdGhpcy5zY2hlbWEgPSB7XG4gICAgLi4udGhpcy50YWJsZXMsXG4gICAgLi4udGhpcy5yZWxhdGlvbnMsXG4gICAgLi4udGhpcy5lbnVtcyxcbiAgfVxuXG4gIHRyeSB7XG4gICAgdGhpcy5wb29sID0gbmV3IFBvb2wodGhpcy5jbGllbnQpXG4gICAgYXdhaXQgdGhpcy5wb29sLmNvbm5lY3QoKVxuXG4gICAgdGhpcy5kYiA9IGRyaXp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FBZ0M7SUFDaEMseUJBQXlCO0lBQ3pCLGNBQWM7SUFDZCxLQUFLO0lBRUwsSUFBSWlCLFNBQVNFLE1BQU0sRUFBRTtRQUNuQkMsUUFBUUMsR0FBRyxDQUFDO1lBQ1ZDLEtBQUssQ0FBQyxzQ0FBc0MsRUFBRUwsU0FBU00sSUFBSSxDQUFDLE1BQU0sQ0FBQztZQUNuRU47UUFDRjtRQUVBLElBQUlGLGFBQWE7WUFDZiw4REFBOEQ7WUFDOURLLFFBQVFDLEdBQUcsQ0FBQztnQkFDVkMsS0FBSztZQUNQO1FBQ0Y7UUFFQSxNQUFNLEVBQUVFLFNBQVNDLGNBQWMsRUFBRSxHQUFHLE1BQU1DLElBQUFBLGdCQUFPLEVBQy9DO1lBQ0VDLE1BQU07WUFDTkMsU0FBUztZQUNUbEIsU0FBUztZQUNUbUIsTUFBTTtRQUNSLEdBQ0E7WUFDRUMsVUFBVTtnQkFDUjdCLFFBQVFVLElBQUksQ0FBQztZQUNmO1FBQ0Y7UUFHRix5Q0FBeUM7UUFDekMsMERBQTBEO1FBQzFELElBQUksQ0FBQ2MsZ0JBQWdCO1lBQ25CeEIsUUFBUVUsSUFBSSxDQUFDO1FBQ2Y7SUFDRjtJQUVBLE1BQU1HO0FBQ1IifQ==
package/dist/create.js CHANGED
@@ -16,7 +16,7 @@ function _interop_require_default(obj) {
16
16
  };
17
17
  }
18
18
  const create = async function create({ collection: collectionSlug, data, req }) {
19
- const db = this.sessions[req.transactionID]?.db || this.db;
19
+ const db = this.sessions[req.transactionID]?.db || this.drizzle;
20
20
  const collection = this.payload.collections[collectionSlug].config;
21
21
  const result = await (0, _upsertRow.upsertRow)({
22
22
  adapter: this,
@@ -29,4 +29,4 @@ const create = async function create({ collection: collectionSlug, data, req })
29
29
  return result;
30
30
  };
31
31
 
32
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uL3NyYy9jcmVhdGUudHMiXSwic291cmNlc0N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NO0lBRWxFLE1BQU1DLFNBQVMsTUFBTUMsSUFBQUEsb0JBQVMsRUFBQztRQUM3QkMsU0FBUyxJQUFJO1FBQ2JYO1FBQ0FFO1FBQ0FVLFFBQVFkLFdBQVdjLE1BQU07UUFDekJDLFdBQVc7UUFDWEMsV0FBV0MsSUFBQUEsb0JBQVcsRUFBQ2hCO0lBQ3pCO0lBRUEsT0FBT1U7QUFDVCJ9
@@ -16,7 +16,7 @@ function _interop_require_default(obj) {
16
16
  };
17
17
  }
18
18
  async function createGlobal({ data, req = {}, slug }) {
19
- const db = this.sessions[req.transactionID]?.db || this.db;
19
+ const db = this.sessions[req.transactionID]?.db || this.drizzle;
20
20
  const globalConfig = this.payload.globals.config.find((config)=>config.slug === slug);
21
21
  const result = await (0, _upsertRow.upsertRow)({
22
22
  adapter: this,
@@ -29,4 +29,4 @@ async function createGlobal({ data, req = {}, slug }) {
29
29
  return result;
30
30
  }
31
31
 
32
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uL3NyYy9jcmVhdGVHbG9iYWwudHMiXSwic291cmNlc0NvbnRlbnQiOlsiaW1wb3J0IHR5cGUgeyBDcmVhdGVHbG9iYWxBcmdzIH0gZnJvbSAncGF5bG9hZC9kYXRhYmFzZSdcbmltcG9ydCB0eXBlIHsgUGF5bG9hZFJlcXVlc3QsIFR5cGVXaXRoSUQgfSBmcm9tICdwYXlsb2FkL3R5cGVzJ1xuXG5pbXBvcnQgdG9TbmFrZUNhc2UgZnJvbSAndG8tc25ha2UtY2FzZSdcblxuaW1wb3J0IHR5cGUgeyBQb3N0Z3Jlc0FkYXB0ZXIgfSBmcm9tICcuL3R5cGVzJ1xuXG5pbXBvcnQgeyB1cHNlcnRSb3cgfSBmcm9tICcuL3Vwc2VydFJvdydcblxuZXhwb3J0IGFzeW5jIGZ1bmN0aW9uIGNyZWF0ZUdsb2JhbDxUIGV4dGVuZHMgVHlwZVdpdGhJRD4oXG4gIHR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0FBQ0gsSUFBSUksYUFBYSxDQUFDLEVBQUVGLE1BQU0sSUFBSSxDQUFDRyxPQUFPO0lBQy9ELE1BQU1DLGVBQWUsSUFBSSxDQUFDQyxPQUFPLENBQUNDLE9BQU8sQ0FBQ0MsTUFBTSxDQUFDQyxJQUFJLENBQUMsQ0FBQ0QsU0FBV0EsT0FBT1IsSUFBSSxLQUFLQTtJQUVsRixNQUFNVSxTQUFTLE1BQU1DLElBQUFBLG9CQUFTLEVBQUk7UUFDaENDLFNBQVMsSUFBSTtRQUNiZDtRQUNBRztRQUNBWSxRQUFRUixhQUFhUSxNQUFNO1FBQzNCQyxXQUFXO1FBQ1hDLFdBQVdDLElBQUFBLG9CQUFXLEVBQUNoQjtJQUN6QjtJQUVBLE9BQU9VO0FBQ1QifQ==
@@ -18,7 +18,7 @@ function _interop_require_default(obj) {
18
18
  };
19
19
  }
20
20
  async function createGlobalVersion({ autosave, globalSlug, req = {}, versionData }) {
21
- const db = this.sessions[req.transactionID]?.db || this.db;
21
+ const db = this.sessions[req.transactionID]?.db || this.drizzle;
22
22
  const global = this.payload.globals.config.find(({ slug })=>slug === globalSlug);
23
23
  const globalTableName = (0, _tosnakecase.default)(globalSlug);
24
24
  const tableName = `_${globalTableName}_v`;
@@ -45,4 +45,4 @@ async function createGlobalVersion({ autosave, globalSlug, req = {}, versionData
45
45
  return result;
46
46
  }
47
47
 
48
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uL3NyYy9jcmVhdGVHbG9iYWxWZXJzaW9uLnRzIl0sInNvdXJjZXNDb250ZW50IjpbImltcG9ydCB0eXBlIHsgVHlwZVdpdGhWZXJzaW9uIH0gZnJvbSAncGF5bG9hZC9kYXRhYmFzZSdcbmltcG9ydCB0eXBlIHsgUGF5bG9hZFJlcXVlc3QsIFR5cGVXaXRoSUQgfSBmcm9tICdwYXlsb2FkL3R5cGVzJ1xuXG5pbXBvcnQgeyBzcWwgfSBmcm9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tZQUNKcEI7WUFDQXFCLFFBQVE7WUFDUkMsU0FBU25CO1FBQ1g7UUFDQUM7UUFDQW1CLFFBQVFDLElBQUFBLGtDQUF3QixFQUFDaEI7UUFDakNpQixXQUFXO1FBQ1hUO0lBQ0Y7SUFFQSxNQUFNVSxRQUFRLElBQUksQ0FBQ0MsTUFBTSxDQUFDWCxVQUFVO0lBRXBDLElBQUlSLE9BQU9vQixRQUFRLENBQUNDLE1BQU0sRUFBRTtRQUMxQixNQUFNekIsR0FBRzBCLE9BQU8sQ0FBQ0MsSUFBQUEsZUFBRyxDQUFBLENBQUM7YUFDWixFQUFFTCxNQUFNOztZQUVULEVBQUVBLE1BQU1NLEVBQUUsQ0FBQyxJQUFJLEVBQUVmLE9BQU9lLEVBQUUsQ0FBQztJQUNuQyxDQUFDO0lBQ0g7SUFFQSxPQUFPZjtBQUNUIn0=
@@ -20,14 +20,14 @@ const migrationTemplate = (upSQL, downSQL)=>`import { MigrateUpArgs, MigrateDown
20
20
  import { sql } from 'drizzle-orm'
21
21
 
22
22
  export async function up({ payload }: MigrateUpArgs): Promise<void> {
23
- ${upSQL ? `await payload.db.db.execute(sql\`
23
+ ${upSQL ? `await payload.db.drizzle.execute(sql\`
24
24
 
25
25
  ${upSQL}\`);
26
26
  ` : '// Migration code'}
27
27
  };
28
28
 
29
- export async function down({ payload }: MigrateUpArgs): Promise<void> {
30
- ${downSQL ? `await payload.db.db.execute(sql\`
29
+ export async function down({ payload }: MigrateDownArgs): Promise<void> {
30
+ ${downSQL ? `await payload.db.drizzle.execute(sql\`
31
31
 
32
32
  ${downSQL}\`);
33
33
  ` : '// Migration code'}
@@ -62,7 +62,7 @@ const createMigration = async function createMigration(payload, migrationName) {
62
62
  const fileName = migrationName ? `${timestamp}_${migrationName.replace(/\W/g, '_')}.ts` : `${timestamp}.ts`;
63
63
  const filePath = `${dir}/${fileName}`;
64
64
  let drizzleJsonBefore = getDefaultDrizzleSnapshot();
65
- const hasMigrationTable = await (0, _migrationTableExists.migrationTableExists)(this.db);
65
+ const hasMigrationTable = await (0, _migrationTableExists.migrationTableExists)(this.drizzle);
66
66
  if (hasMigrationTable) {
67
67
  const migrationQuery = await payload.find({
68
68
  collection: 'payload-migrations',
@@ -82,4 +82,4 @@ const createMigration = async function createMigration(payload, migrationName) {
82
82
  });
83
83
  };
84
84
 
85
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uL3NyYy9jcmVhdGVNaWdyYXRpb24udHMiXSwic291cmNlc0NvbnRlbnQiOlsiLyogZXNsaW50LWRpc2FibGUgbm8tcmVzdHJpY3RlZC1zeW50YXgsIG5vLWF3YWl0LWluLWxvb3AgKi9cbmltcG9ydCB0eXBlIHsgRHJpenpsZVNuYXBzaG90SlNPTiB9IGZyb20gJ2RyaXp6bGUta2l0L3V0aWxzJ1xuaW1wb3J0IHR5cGUgeyBDcmVhdGVNaWdyYXRpb24gfSBmcm9tICdwYXlsb2FkL2RhdGFiYXNlJ1xuXG5pbXBvcnQgeyBnZW5lcmF0ZURyaXp6bGVKc29uLCBnZW5lcmF0ZU1pZ3JhdGlvbiB9IGZyb20gJ2RyaXp6bGUta2l0L3V0aWxzJ1xuaW1wb3J0IGZzIGZyb20gJ2ZzJ1xuXG5pbXBvcnQgdHlwZSB7IFBvc3RncmVzQWRhcHRlciB9IGZyb20gJy4vdHlwZXMnXG5cbmltcG9ydCB7IG1pZ3JhdGlvblRhYmxlRXhpc3RzIH0gZnJvbSAnLi91dGlsaXRpZXMvbWlncmF0aW9uVGFibGVFeGlzdHMnXG5cbmNvbnN0IG1pZ3JhdGlvblRlbXBsYXRlID0gKFxuICB1cFNRTD86IHN0cmluZyxcbiAgZG93blNRTD86IHN0cmluZyxcbikgPT4gYGltcG9ydCB7IE1pZ3JhdGVVcEFyZ3MsIE1pZ3JhdGVEb3duQXJncyB9IGZyb20gJ0BwYXlsb2FkY21zL2RiLXBvc3RncmVzJ1xuaW1wb3J0IHsgc3FsI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QU1FLFdBQVcsQ0FBQyxFQUFFaEIsSUFBSSxDQUFDLEVBQUVlLFNBQVMsQ0FBQztJQUVyQyxJQUFJRSxvQkFBb0JoQztJQUV4QixNQUFNaUMsb0JBQW9CLE1BQU1DLElBQUFBLDBDQUFvQixFQUFDLElBQUksQ0FBQ0MsT0FBTztJQUVqRSxJQUFJRixtQkFBbUI7UUFDckIsTUFBTUcsaUJBQWlCLE1BQU0xQixRQUFRMkIsSUFBSSxDQUFDO1lBQ3hDQyxZQUFZO1lBQ1pDLE9BQU87WUFDUEMsTUFBTTtRQUNSO1FBRUEsSUFBSUosZUFBZUssSUFBSSxFQUFFLENBQUMsRUFBRSxFQUFFQyxRQUFRO1lBQ3BDVixvQkFBb0JJLGVBQWVLLElBQUksQ0FBQyxFQUFFLEVBQUVDO1FBQzlDO0lBQ0Y7SUFFQSxNQUFNQyxtQkFBbUJDLElBQUFBLDBCQUFtQixFQUFDLElBQUksQ0FBQ0YsTUFBTTtJQUN4RCxNQUFNRyxrQkFBa0IsTUFBTUMsSUFBQUEsd0JBQWlCLEVBQUNkLG1CQUFtQlc7SUFDbkUsTUFBTUksb0JBQW9CLE1BQU1ELElBQUFBLHdCQUFpQixFQUFDSCxrQkFBa0JYO0lBRXBFZCxXQUFFLENBQUM4QixhQUFhLENBQ2RqQixVQUNBbEMsa0JBQ0VnRCxnQkFBZ0JJLE1BQU0sR0FBR0osaUJBQWlCSyxLQUFLLFFBQVFDLFdBQ3ZESixrQkFBa0JFLE1BQU0sR0FBR0YsbUJBQW1CRyxLQUFLLFFBQVFDO0lBRy9EekMsUUFBUUUsTUFBTSxDQUFDQyxJQUFJLENBQUM7UUFBRUMsS0FBSyxDQUFDLHFCQUFxQixFQUFFaUIsU0FBUyxDQUFDO0lBQUM7QUFDaEUifQ==
@@ -18,7 +18,7 @@ function _interop_require_default(obj) {
18
18
  };
19
19
  }
20
20
  async function createVersion({ autosave, collectionSlug, parent, req = {}, versionData }) {
21
- const db = this.sessions[req.transactionID]?.db || this.db;
21
+ const db = this.sessions[req.transactionID]?.db || this.drizzle;
22
22
  const collection = this.payload.collections[collectionSlug].config;
23
23
  const collectionTableName = (0, _tosnakecase.default)(collectionSlug);
24
24
  const tableName = `_${collectionTableName}_v`;
@@ -51,4 +51,4 @@ async function createVersion({ autosave, collectionSlug, parent, req = {}, versi
51
51
  return result;
52
52
  }
53
53
 
54
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uL3NyYy9jcmVhdGVWZXJzaW9uLnRzIl0sInNvdXJjZXNDb250ZW50IjpbImltcG9ydCB0eXBlIHsgQ3JlYXRlVmVyc2lvbkFyZ3MsIFR5cGVXaXRoVmVyc2lvbiB9IGZyb20gJ3BheWxvYWQvZGF0YWJhc2UnXG5pbXBvcnQgdHlwZSB7IFBheWxvYWRSZXF1ZXN0LCBUeXBlV2l0aElEIH0gZnJvbSAncGF5bG9hZC90eXBlcydcblxuaW1wb3J0IHsgc3FsIH0gZnJvbSAnZHJpenpsZS1vcm0nXG5pbXBvcnQgeyBidWlsZFZlcnNpb25Db2xsZWN0aW9uRmllbGRzIH0gZnJvbSAncGF5bG9hZC92ZXJzaW9ucydcbmltcG9ydCB0b1NuYWtlQ2FzZSBmcm9tICd0by1zbmFrZS1jYXNlJ1xuXG5pbXBvcnQgdHlwZSB7IFBvc3RncmVzQWRhcHRlciB9IGZyb20gJy4vdHlwZXMnXG5cbmltcG9ydCB7IHVwc2VydFJvdyB9IGZyb20gJy4vdXBzZXJ0Um93J1xuXG5leHBvcnQgYXN5bmMgZnVuY3Rpb24gY3JlYXRlVmVyc2lvbjxUIGV4dGVuZHMgVHlwZVdpdGhJRD4oXG4gIHRoaXM6IFBvc3RncmVzQWRhcHRlcixcbiAge1xuICAgIGF1dG9zYXZlLFxuICAgIGNvbGxlY3Rpb25TbHVnLFxuICAgIHBhcmVudCxcbiAgICByZXEgPSB7fSBhcyBQYXlsb2FkUmVxdWVzdCxcbiAgICB2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bUJBQW1CO1lBQ3BCLEVBQUVGLE1BQU1PLEVBQUUsQ0FBQyxHQUFHLEVBQUVMLG1CQUFtQnpCLE1BQU0sQ0FBQztZQUMxQyxFQUFFeUIsbUJBQW1CTSxJQUFJLENBQUMsR0FBRyxFQUFFLFNBQVM7WUFDeEMsRUFBRU4sa0JBQWtCLENBQUMsQ0FBQyxFQUFFMUIsZUFBZSxFQUFFLENBQUMsQ0FBQyxDQUFDLEdBQUcsRUFBRUMsT0FBTztZQUN4RCxFQUFFdUIsTUFBTU8sRUFBRSxDQUFDLElBQUksRUFBRWhCLE9BQU9nQixFQUFFLENBQUM7RUFDckMsQ0FBQztJQUNEO0lBRUEsT0FBT2hCO0FBQ1QifQ==
@@ -17,7 +17,7 @@ function _interop_require_default(obj) {
17
17
  };
18
18
  }
19
19
  const deleteMany = async function deleteMany({ collection, req = {}, where }) {
20
- const db = this.sessions[req.transactionID]?.db || this.db;
20
+ const db = this.sessions[req.transactionID]?.db || this.drizzle;
21
21
  const collectionConfig = this.payload.collections[collection].config;
22
22
  const tableName = (0, _tosnakecase.default)(collection);
23
23
  const result = await (0, _findMany.findMany)({
@@ -40,4 +40,4 @@ const deleteMany = async function deleteMany({ collection, req = {}, where }) {
40
40
  }
41
41
  };
42
42
 
43
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uL3NyYy9kZWxldGVNYW55LnRzIl0sInNvdXJjZXNDb250ZW50IjpbImltcG9ydCB0eXBlIHsgRGVsZXRlTWFueSB9IGZyb20gJ3BheWxvYWQvZGF0YWJhc2UnXG5pbXBvcnQgdHlwZSB7IFBheWxvYWRSZXF1ZXN0IH0gZnJvbSAncGF5bG9hZC90eXBlcydcblxuaW1wb3J0IHsgaW5BcnJheSB9IGZyb20gJ2RyaXp6bGUtb3JtJ1xuaW1wb3J0IHRvU25ha2VDYXNlIGZyb20gJ3RvLXNuYWtlLWNhc2UnXG5cbmltcG9ydCB0eXBlIHsgUG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UFJTSxNQUFNLEdBQUcsR0FBRztRQUNsQixNQUFNeEIsR0FBR3lCLE1BQU0sQ0FBQyxJQUFJLENBQUNDLE1BQU0sQ0FBQ2xCLFVBQVUsRUFBRVQsS0FBSyxDQUFDNEIsSUFBQUEsbUJBQU8sRUFBQyxJQUFJLENBQUNELE1BQU0sQ0FBQ2xCLFVBQVUsQ0FBQ2UsRUFBRSxFQUFFTDtJQUNuRjtBQUNGIn0=
package/dist/deleteOne.js CHANGED
@@ -18,7 +18,7 @@ function _interop_require_default(obj) {
18
18
  };
19
19
  }
20
20
  const deleteOne = async function deleteOne({ collection, req = {}, where: incomingWhere }) {
21
- const db = this.sessions[req.transactionID]?.db || this.db;
21
+ const db = this.sessions[req.transactionID]?.db || this.drizzle;
22
22
  const collectionConfig = this.payload.collections[collection].config;
23
23
  const tableName = (0, _tosnakecase.default)(collection);
24
24
  const { where } = await (0, _buildQuery.default)({
@@ -44,4 +44,4 @@ const deleteOne = async function deleteOne({ collection, req = {}, where: incomi
44
44
  return result;
45
45
  };
46
46
 
47
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uL3NyYy9kZWxldGVPbmUudHMiXSwic291cmNlc0NvbnRlbnQiOlsiaW1wb3J0IHR5cGUgeyBEZWxldGVPbmUgfSBmcm9tICdwYXlsb2FkL2RhdGFiYXNlJ1xuaW1wb3J0IHR5cGUgeyBQYXlsb2FkUmVxdWVzdCB9IGZyb20gJ3BheWxvYWQvdHlwZXMnXG5cbmltcG9ydCB0b1NuYWtlQ2FzZSBmcm9tICd0by1zbmFrZS1jYXNlJ1xuXG5pbXBvcnQgdHlwZSB7IFBvc3RncmVzQWRhcHRlciB9IGZyb20gJy4vdHlwZXMnXG5cbmltcG9ydCB7IGJ1aWxkRmluZE1hbnlBcmdzIH0gZnJvbSAnLi9maW5kL2J1aWxkRmluZE1hbnlBcmdzJ1xuaW1wb3J0IGJ1aWxkUXVlcnkgZnJvbSAnLi9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lDLE9BQU9xQjtBQUNUIn0=
@@ -18,7 +18,7 @@ function _interop_require_default(obj) {
18
18
  };
19
19
  }
20
20
  const deleteVersions = async function deleteVersion({ collection, locale, req = {}, where: where }) {
21
- const db = this.sessions[req.transactionID]?.db || this.db;
21
+ const db = this.sessions[req.transactionID]?.db || this.drizzle;
22
22
  const collectionConfig = this.payload.collections[collection].config;
23
23
  const tableName = `_${(0, _tosnakecase.default)(collection)}_v`;
24
24
  const fields = (0, _versions.buildVersionCollectionFields)(collectionConfig);
@@ -43,4 +43,4 @@ const deleteVersions = async function deleteVersion({ collection, locale, req =
43
43
  return docs;
44
44
  };
45
45
 
46
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uL3NyYy9kZWxldGVWZXJzaW9ucy50cyJdLCJzb3VyY2VzQ29udGVudCI6WyJpbXBvcnQgdHlwZSB7IERlbGV0ZVZlcnNpb25zIH0gZnJvbSAncGF5bG9hZC9kYXRhYmFzZSdcbmltcG9ydCB0eXBlIHsgUGF5bG9hZFJlcXVlc3QsIFNhbml0aXplZENvbGxlY3Rpb25Db25maWcgfSBmcm9tICdwYXlsb2FkL3R5cGVzJ1xuXG5pbXBvcnQgeyBpbkFycmF5IH0gZnJvbSAnZHJpenpsZS1vcm0nXG5pbXBvcnQgeyBidWlsZFZlcnNpb25Db2xsZWN0aW9uRmllbGRzIH0gZnJvbSAncGF5bG9hZC92ZXJzaW9ucydcbmltcG9ydCB0b1NuYWtlQ2FzZSBmcm9tICd0by1zbmFrZS1jYXNlJ1xuXG5pbXBvcnQgdHlwZSB7IFBvc3RncmVzQWRhcHRlciB9IGZyb20gJy4vdHlwZXMnXG5cbmltcG9ydCB7IGZpbmRNYW55IH0gZnJvbSAnLi9maW5kL2ZpbmRNYW55J1xuXG5leHBvcnQgY29uc3QgZGVsZXRlVmVyc2lvbnM6IERlbGV0ZVZlcnNpb25zID0gYXN5bmMgZnVuY3Rpb24gZGVsZXRlVmVy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DQUFDVixXQUFXLENBQUNXLE1BQU07SUFFL0YsTUFBTUMsWUFBWSxDQUFDLENBQUMsRUFBRUMsSUFBQUEsb0JBQVcsRUFBQ2IsWUFBWSxFQUFFLENBQUM7SUFDakQsTUFBTWMsU0FBU0MsSUFBQUEsc0NBQTRCLEVBQUNQO0lBRTVDLE1BQU0sRUFBRVEsSUFBSSxFQUFFLEdBQUcsTUFBTUMsSUFBQUEsa0JBQVEsRUFBQztRQUM5QkMsU0FBUyxJQUFJO1FBQ2JKO1FBQ0FLLE9BQU87UUFDUGxCO1FBQ0FtQixNQUFNO1FBQ05DLFlBQVk7UUFDWm5CO1FBQ0FVO1FBQ0FUO0lBQ0Y7SUFFQSxNQUFNbUIsTUFBTSxFQUFFO0lBRWROLEtBQUtPLE9BQU8sQ0FBQyxDQUFDQztRQUNaRixJQUFJRyxJQUFJLENBQUNELElBQUlFLEVBQUU7SUFDakI7SUFFQSxJQUFJSixJQUFJSyxNQUFNLEdBQUcsR0FBRztRQUNsQixNQUFNdkIsR0FBR3dCLE1BQU0sQ0FBQyxJQUFJLENBQUNDLE1BQU0sQ0FBQ2pCLFVBQVUsRUFBRVQsS0FBSyxDQUFDMkIsSUFBQUEsbUJBQU8sRUFBQyxJQUFJLENBQUNELE1BQU0sQ0FBQ2pCLFVBQVUsQ0FBQ2MsRUFBRSxFQUFFSjtJQUNuRjtJQUVBLE9BQU9OO0FBQ1QifQ==
@@ -19,7 +19,7 @@ function _interop_require_default(obj) {
19
19
  };
20
20
  }
21
21
  const findMany = async function find({ adapter, fields, limit: limitArg, locale, page = 1, pagination, req = {}, skip, sort, tableName, where: whereArg }) {
22
- const db = adapter.sessions[req.transactionID]?.db || adapter.db;
22
+ const db = adapter.sessions[req.transactionID]?.db || adapter.drizzle;
23
23
  const table = adapter.tables[tableName];
24
24
  let limit = limitArg;
25
25
  let totalDocs;
@@ -194,4 +194,4 @@ const findMany = async function find({ adapter, fields, limit: limitArg, locale,
194
194
  };
195
195
  };
196
196
 
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lBQ0Y7QUFDRiJ9
package/dist/findOne.js CHANGED
@@ -18,7 +18,7 @@ function _interop_require_default(obj) {
18
18
  };
19
19
  }
20
20
  async function findOne({ collection, locale, req = {}, where: incomingWhere }) {
21
- const db = this.sessions[req.transactionID]?.db || this.db;
21
+ const db = this.sessions[req.transactionID]?.db || this.drizzle;
22
22
  const collectionConfig = this.payload.collections[collection].config;
23
23
  const tableName = (0, _tosnakecase.default)(collection);
24
24
  const { where } = await (0, _buildQuery.default)({
@@ -46,4 +46,4 @@ async function findOne({ collection, locale, req = {}, where: incomingWhere }) {
46
46
  });
47
47
  }
48
48
 
49
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uL3NyYy9maW5kT25lLnRzIl0sInNvdXJjZXNDb250ZW50IjpbImltcG9ydCB0eXBlIHsgRmluZE9uZUFyZ3MgfSBmcm9tICdwYXlsb2FkL2RhdGFiYXNlJ1xuaW1wb3J0IHR5cGUgeyBQYXlsb2FkUmVxdWVzdCwgU2FuaXRpemVkQ29sbGVjdGlvbkNvbmZpZywgVHlwZVdpdGhJRCB9IGZyb20gJ3BheWxvYWQvdHlwZXMnXG5cbmltcG9ydCB0b1NuYWtlQ2FzZSBmcm9tICd0by1zbmFrZS1jYXNlJ1xuXG5pbXBvcnQgdHlwZSB7IFBvc3RncmVzQWRhcHRlciB9IGZyb20gJy4vdHlwZXMnXG5cbmltcG9ydCB7IGJ1aWxkRmluZE1hbnlBcmdzIH0gZnJvbSAnLi9maW5kL2J1aWxkRmluZE1hbnlBcmdzJ1xuaW1wb3J0IGJ1aWxkUXVlcnkgZnJvbSAnLi9xdWVyaWVzL2J1aWxkUXVlcnknXG5pbXBvcnQgeyB0cmFuc2Zvcm0gfSBmcm9tICcuL3RyYW5zZm9ybS9yZWFkJ1xuXG5leHBvcnQgYXN5bmMgZnVuY3Rpb24gZmluZE9uZTxUIGV4dGVuZHMgVHlwZVdpdGhJRD4oXG4gIHRoaXM6IF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UksQ0FBQ0MsT0FBTyxDQUFDQyxXQUFXLENBQUNYLFdBQVcsQ0FBQ1ksTUFBTTtJQUMvRixNQUFNQyxZQUFZQyxJQUFBQSxvQkFBVyxFQUFDZDtJQUU5QixNQUFNLEVBQUVHLEtBQUssRUFBRSxHQUFHLE1BQU1ZLElBQUFBLG1CQUFVLEVBQUM7UUFDakNDLFNBQVMsSUFBSTtRQUNiQyxRQUFRUixpQkFBaUJRLE1BQU07UUFDL0JoQjtRQUNBWTtRQUNBVixPQUFPQztJQUNUO0lBRUEsTUFBTWMsZUFBZUMsSUFBQUEsb0NBQWlCLEVBQUM7UUFDckNILFNBQVMsSUFBSTtRQUNiSSxPQUFPO1FBQ1BILFFBQVFSLGlCQUFpQlEsTUFBTTtRQUMvQko7SUFDRjtJQUVBSyxhQUFhZixLQUFLLEdBQUdBO0lBRXJCLE1BQU1rQixNQUFNLE1BQU1oQixHQUFHaUIsS0FBSyxDQUFDVCxVQUFVLENBQUNVLFNBQVMsQ0FBQ0w7SUFFaEQsSUFBSSxDQUFDRyxLQUFLO1FBQ1IsT0FBTztJQUNUO0lBRUEsT0FBT0csSUFBQUEsZUFBUyxFQUFJO1FBQ2xCWixRQUFRLElBQUksQ0FBQ0YsT0FBTyxDQUFDRSxNQUFNO1FBQzNCYSxNQUFNSjtRQUNOSixRQUFRUixpQkFBaUJRLE1BQU07SUFDakM7QUFDRiJ9
package/dist/index.js CHANGED
@@ -44,12 +44,12 @@ function _interop_require_default(obj) {
44
44
  }
45
45
  function postgresAdapter(args) {
46
46
  function adapter({ payload }) {
47
- const migrationDir = args.migrationDir || _path.default.resolve(__dirname, '../../../migrations');
47
+ const migrationDir = args.migrationDir || _path.default.resolve(process.cwd(), 'src/migrations');
48
48
  return (0, _database.createDatabaseAdapter)({
49
49
  ...args,
50
50
  name: 'postgres',
51
51
  // Postgres-specific
52
- db: undefined,
52
+ drizzle: undefined,
53
53
  enums: {},
54
54
  pool: undefined,
55
55
  relations: {},
@@ -92,4 +92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7WUFDZEMsU0FBQUEsZ0JBQU87WUFDUEMsTUFBQUEsVUFBSTtZQUNKQyxZQUFBQSxzQkFBVTtZQUNWQyxvQkFBQUEsc0NBQWtCO1lBQ2xCQyxTQUFBQSxnQkFBTztZQUNQQyxjQUFBQSwwQkFBWTtZQUNaQyxNQUFBQSxVQUFJO1lBQ0pDLFNBQUFBLGdCQUFPO1lBQ1BDLGVBQUFBLDRCQUFhO1lBQ2JuQztZQUNBRDtZQUNBcUMsYUFBQUEsd0JBQVc7WUFDWEMscUJBQUFBLHdDQUFtQjtZQUNuQkMsY0FBQUEsMEJBQVk7WUFDWkMscUJBQUFBLHdDQUFtQjtZQUNuQkMsV0FBQUEsaUJBQVM7WUFDVEMsZUFBQUEsNEJBQWE7WUFDYkMsU0FBQUEsZ0JBQU87UUFDVDtJQUNGO0lBRUEsT0FBTzVDO0FBQ1QifQ==
package/dist/migrate.js CHANGED
@@ -20,7 +20,7 @@ async function migrate() {
20
20
  });
21
21
  let latestBatch = 0;
22
22
  let existingMigrations = [];
23
- const hasMigrationTable = await (0, _migrationTableExists.migrationTableExists)(this.db);
23
+ const hasMigrationTable = await (0, _migrationTableExists.migrationTableExists)(this.drizzle);
24
24
  if (hasMigrationTable) {
25
25
  ({ docs: existingMigrations } = await payload.find({
26
26
  collection: 'payload-migrations',
@@ -31,7 +31,7 @@ async function migrate() {
31
31
  latestBatch = Number(existingMigrations[0]?.batch);
32
32
  }
33
33
  } else {
34
- await (0, _createMigrationTable.createMigrationTable)(this.db);
34
+ await (0, _createMigrationTable.createMigrationTable)(this.drizzle);
35
35
  }
36
36
  const newBatch = latestBatch + 1;
37
37
  // Execute 'up' function for each migration sequentially
@@ -45,8 +45,7 @@ async function migrate() {
45
45
  payload.logger.info({
46
46
  msg: `Migrating: ${migration.name}`
47
47
  });
48
- const pgAdapter = payload.db// TODO: Fix this typing
49
- ;
48
+ const pgAdapter = payload.db;
50
49
  const drizzleJSON = (0, _utils.generateDrizzleJson)(pgAdapter.schema);
51
50
  try {
52
51
  await migration.up({
@@ -78,4 +77,4 @@ async function migrate() {
78
77
  }
79
78
  }
80
79
 
81
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uL3NyYy9taWdyYXRlLnRzIl0sInNvdXJjZXNDb250ZW50IjpbIi8qIGVzbGludC1kaXNhYmxlIG5vLXJlc3RyaWN0ZWQtc3ludGF4LCBuby1hd2FpdC1pbi1sb29wICovXG5pbXBvcnQgeyBnZW5lcmF0ZURyaXp6bGVKc29uIH0gZnJvbSAnZHJpenpsZS1raXQvdXRpbHMnXG5pbXBvcnQgeyByZWFkTWlncmF0aW9uRmlsZXMgfSBmcm9tICdwYXlsb2FkL2RhdGFiYXNlJ1xuaW1wb3J0IHsgRGF0YWJhc2VFcnJvciB9IGZyb20gJ3BnJ1xuXG5pbXBvcnQgdHlwZSB7IFBvc3RncmVzQWRhcHRlciB9IGZyb20gJy4vdHlwZXMnXG5cbmltcG9ydCB7IGNyZWF0ZU1pZ3JhdGlvblRhYmxlIH0gZnJvbSAnLi91dGlsaXRpZXMvY3JlYXRlTWlncmF0aW9uVGFibGUnXG5pbXBvcnQgeyBtaWdyYXRpb25UYWJsZUV4aXN0cyB9IGZyb20gJy4vdXRpbGl0aWVzL21pZ3JhdGlvblRhYmxlRXhpc3RzJ1xuXG5leHBvcnQgYXN5bmMgZnVuY3Rpb24gbWlncmF0ZSh0aGlzOiBQb3N0Z3Jlc0FkYXB0ZXIpOiBQcm9taXNlPHZvaWQ+IHtcbiAgY29uc3QgeyBwYXlsb2FkIH0gPSB0aGlzXG4gIGNvbnN0IG1pZ3JhdGlvbkZpbGVzID0gYXdhaXQgcmVhZE1pZ3JhdGlvbkZpbGVzKHsgcGF5bG9hZCB9KVxuXG4gIGxldCBsYXRlc3RCYXRjaCA9IDBcbiAgbGV0IGV4aXN0aW5nTWlncmF0aW9ucyA9IFtdXG5cbiAgY29uc3QgaGFzTWlncmF0aW9uVGFibGUgP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BTyxDQUFDLEVBQUUsRUFBRVMsSUFBSUUsT0FBTyxDQUFDLENBQUM7Z0JBQ3pCLElBQUlGLElBQUlHLElBQUksRUFBRVosT0FBTyxDQUFDLEVBQUUsRUFBRVMsSUFBSUcsSUFBSSxDQUFDLENBQUM7WUFDdEM7WUFFQXRDLFFBQVF3QixNQUFNLENBQUNlLEtBQUssQ0FBQztnQkFBRUo7Z0JBQUtUO1lBQUk7WUFDaEMsTUFBTVM7UUFDUjtJQUNGO0FBQ0YifQ==
@@ -20,7 +20,7 @@ async function migrateStatus() {
20
20
  msg: `Found ${migrationFiles.length} migration files.`
21
21
  });
22
22
  let existingMigrations = [];
23
- const hasMigrationTable = await (0, _migrationTableExists.migrationTableExists)(this.db);
23
+ const hasMigrationTable = await (0, _migrationTableExists.migrationTableExists)(this.drizzle);
24
24
  if (hasMigrationTable) {
25
25
  ({ existingMigrations } = await (0, _database.getMigrations)({
26
26
  payload
@@ -51,4 +51,4 @@ async function migrateStatus() {
51
51
  p.printTable();
52
52
  }
53
53
 
54
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uL3NyYy9taWdyYXRlU3RhdHVzLnRzIl0sInNvdXJjZXNDb250ZW50IjpbImltcG9ydCB7IFRhYmxlIH0gZnJvbSAnY29uc29sZS10YWJsZS1wcmludGVyJ1xuaW1wb3J0IHsgZ2V0TWlncmF0aW9ucywgcmVhZE1pZ3JhdGlvbkZpbGVzIH0gZnJvbSAncGF5bG9hZC9kYXRhYmFzZSdcblxuaW1wb3J0IHR5cGUgeyBQb3N0Z3Jlc0FkYXB0ZXIgfSBmcm9tICcuL3R5cGVzJ1xuXG5pbXBvcnQgeyBtaWdyYXRpb25UYWJsZUV4aXN0cyB9IGZyb20gJy4vdXRpbGl0aWVzL21pZ3JhdGlvblRhYmxlRXhpc3RzJ1xuXG5leHBvcnQgYXN5bmMgZnVuY3Rpb24gbWlncmF0ZVN0YXR1cyh0aGlzOiBQb3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G1CQUFtQlUsSUFBSSxDQUFDLENBQUNDLElBQU1BLEVBQUVDLElBQUksS0FBS0osVUFBVUksSUFBSTtRQUNsRixPQUFPO1lBQ0xDLE1BQU1MLFVBQVVJLElBQUk7WUFDcEIsc0RBQXNEO1lBQ3RERSxPQUFPTCxtQkFBbUJNO1lBQzFCQyxLQUFLUCxvQkFBb0IsUUFBUTtRQUNuQztJQUNGO0lBRUEsTUFBTVEsSUFBSSxJQUFJQywwQkFBSztJQUVuQlosU0FBU2EsT0FBTyxDQUFDLENBQUNDO1FBQ2hCSCxFQUFFSSxNQUFNLENBQUNELEdBQUc7WUFDVkUsT0FBT0YsRUFBRUosR0FBRyxLQUFLLFFBQVEsVUFBVTtRQUNyQztJQUNGO0lBQ0FDLEVBQUVNLFVBQVU7QUFDZCJ9
@@ -143,4 +143,4 @@ async function parseParams({ adapter, fields, joinAliases, joins, locale, select
143
143
  return result;
144
144
  }
145
145
 
146
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9xdWVyaWVzL3BhcnNlUGFyYW1zLnRzIl0sInNvdXJjZXNDb250ZW50IjpbIi8qIGVzbGludC1kaXNhYmxlIG5vLWF3YWl0LWluLWxvb3AgKi9cbmltcG9ydCB0eXBlIHsgU1FMIH0gZnJvbSAnZHJpenpsZS1vcm0nXG5pbXBvcnQgdHlwZSB7IEZpZWxkLCBPcGVyYXRvciwgV2hlcmUgfSBmcm9tICdwYXlsb2FkL3R5cGVzJ1xuXG5pbXBvcnQgeyBhbmQsIGlsaWtlLCBpc05vdE51bGwsIGlzTnVsbCwgbmUsIG9yLCBzcWwgfSBmcm9tICdkcml6emxlLW9ybSdcbmltcG9ydCB7IFF1ZXJ5RXJyb3IgfSBmcm9tICdwYXlsb2FkL2Vycm9ycydcbmltcG9ydCB7IHZhbGlkT3BlcmF0b3JzIH0gZnJvbSAncGF5bG9hZC90eXBlcydcblxuaW1wb3J0IHR5cGUgey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biAgICAgICAgICAgIGZvciAoY29uc3Qgb3BlcmF0b3Igb2YgT2JqZWN0LmtleXMocGF0aE9wZXJhdG9ycykpIHtcbiAgICAgICAgICAgICAgaWYgKHZhbGlkT3BlcmF0b3JzLmluY2x1ZGVzKG9wZXJhdG9yIGFzIE9wZXJhdG9yKSkge1xuICAgICAgICAgICAgICAgIGNvbnN0IHtcbiAgICAgICAgICAgICAgICAgIGNvbHVtbk5hbWUsXG4gICAgICAgICAgICAgICAgICBjb25zdHJhaW50czogcXVlcnlDb25zdHJhaW50cyxcbiAgICAgICAgICAgICAgICAgIGZpZWxkLFxuICAgICAgICAgICAgICAgICAgZ2V0Tm90TnVsbENvbHVtbkJ5VmFsdWUsXG4gICAgICAgICAgICAgICAgICBwYXRoU2VnbWVudHMsXG4gICAgICAgICAgICAgICAgICByYXdDb2x1bW4sXG4gICAgICAgICAgICAgICAgICB0YWJsZSxcbiAgICAgICAgICAgICAgICB9ID0gZ2V0VGFibGVDb2x1bW5Gcm9tUGF0aCh7XG4gICAgICAgICAgICAgICAgICBhZGFwdGVyLFxuICAgICAgICAgICAgICAgICAgY29sbGVjdGlvblBhdGg6IHJlbGF0aW9uT3JQYXRoLFxuICAgICAgICAgICAgICAgICAgZmllbGRzLFxuICAgICAgICAgICAgICAgICAgam9pbkFsaWFzZXMsXG4gICAgICAgICAgICAgICAgICBqb2lucyxcbiAgICAgICAgICAgICAgICAgIGxvY2FsZSxcbiAgICAgICAgICAgICAgICAgIHBhdGhTZWdtZW50czogcmVsYXRpb25PclBhdGgucmVwbGFjZSgvX18vZywgJy4nKS5zcGxpdCgnLicpLFxuICAgICAgICAgICAgICAgICAgc2VsZWN0RmllbGRzLFxuICAgICAgICAgICAgICAgICAgdGFibGVOYW1lLFxuICAgICAgICAgICAgICAgIH0pXG5cbiAgICAgICAgICAgICAgICBjb25zdCB2YWwgPSB3aGVyZVtyZWxhdGlvbk9yUGF0aF1bb3BlcmF0b3JdXG5cbiAgICAgICAgICAgICAgICBxdWVyeUNvbnN0cmFpbnRzLmZvckVhY2goKHsgY29sdW1uTmFtZTogY29sLCB0YWJsZTogY29uc3RyYWludFRhYmxlLCB2YWx1ZSB9KSA9PiB7XG4gICAgICAgICAgICAgICAgICBjb25zdHJhaW50cy5wdXNoKG9wZXJhdG9yTWFwLmVxdWFscyhjb25zdHJhaW50VGFibGVbY29sXSwgdmFsdWUpKVxuICAgICAgICAgICAgICAgIH0pXG5cbiAgICAgICAgICAgICAgICBpZiAoWydqc29uJywgJ3JpY2hUZXh0J10uaW5jbHVkZXMoZmllbGQudHlwZSkgJiYgQXJyYXkuaXNBcnJheShwYXRoU2VnbWVudHMpKSB7XG4gICAgICAgICAgICAgICAgICBjb25zdCBzZWdtZW50cyA9IHBhdGhTZWdtZW50cy5zbGljZSgxKVxuICAgICAgICAgICAgICAgICAgc2VnbWVudHMudW5zaGlmdCh0YWJsZVtjb2x1bW5OYW1lXS5uYW1lKVxuXG4gICAgICAgICAgICAgICAgICBpZiAoZmllbGQudHlwZSA9PT0gJ3JpY2hUZXh0Jykge1xuICAgICAgICAgICAgICAgICAgICBjb25zdCBqc29uUXVlcnkgPSBjcmVhdGVKU09OUXVlcnkoe1xuICAgICAgICAgICAgICAgICAgICAgIG9wZXJhdG9yLFxuICAgICAgICAgICAgICAgICAgICAgIHBhdGhTZWdtZW50czogc2VnbWVudHMsXG4gICAgICAgICAgICAgICAgICAgICAgdHJlYXRBc0FycmF5OiBbJ2NoaWxkcmVuJ10sXG4gICAgICAgICAgICAgICAgICAgICAgdHJlYXRSb290QXNBcnJheTogdHJ1ZSxcbiAgICAgICAgICAgICAgICAgICAgICB2YWx1ZTogdmFsLFxuICAgICAgICAgICAgICAgICAgICB9KVxuXG4gICAgICAgICAgICAgICAgICAgIGNvbnN0cmFpbnRzLnB1c2goc3FsLnJhdyhqc29uUXVlcnkpKVxuICAgICAgICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICAgICAgICBpZiAoZmllbGQudHlwZSA9PT0gJ2pzb24nKSB7XG4gICAgICAgICAgICAgICAgICAgIGNvbnN0IGpzb25RdWVyeSA9IGNvbnZlcnRQYXRoVG9KU09OVHJhdmVyc2FsKHBhdGhTZWdtZW50cylcbiAgICAgICAgICAgICAgICAgICAgY29uc3RyYWludHMucHVzaChzcWwucmF3KGAke3RhYmxlW2NvbHVtbk5hbWVdLm5hbWV9JHtqc29uUXVlcnl9ID0gJyUke3ZhbH0lJ2ApKVxuICAgICAgICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICAgICAgICBicmVha1xuICAgICAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgICAgIGlmIChnZXROb3ROdWxsQ29sdW1uQnlWYWx1ZSkge1xuICAgICAgICAgICAgICAgICAgY29uc3QgY29sdW1uTmFtZSA9IGdldE5vdE51bGxDb2x1bW5CeVZhbHVlKHZhbClcbiAgICAgICAgICAgICAgICAgIGlmIChjb2x1bW5OYW1lKSB7XG4gICAgICAgICAgICAgICAgICAgIGNvbnN0cmFpbnRzLnB1c2goaXNOb3ROdWxsKHRhYmxlW2NvbHVtbk5hbWVdKSlcbiAgICAgICAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgICAgIHRocm93IG5ldyBRdWVyeUVycm9yKFt7IHBhdGg6IHJlbGF0aW9uT3JQYXRoIH1dKVxuICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgYnJlYWtcbiAgICAgICAgICAgICAgICB9XG5cbiAgICAgICAgICAgICAgICBpZiAob3BlcmF0b3IgPT09ICdsaWtlJykge1xuICAgICAgICAgICAgICAgICAgY29uc3RyYWludHMucHVzaChcbiAgICAgICAgICAgICAgICAgICAgYW5kKC4uLnZhbC5zcGxpdCgnICcpLm1hcCgod29yZCkgPT4gaWxpa2UodGFibGVbY29sdW1uTmFtZV0sIGAlJHt3b3JkfSVgKSkpLFxuICAgICAgICAgICAgICAgICAgKVxuICAgICAgICAgICAgICAgICAgYnJlYWtcbiAgICAgICAgICAgICAgICB9XG5cbiAgICAgICAgICAgICAgICBjb25zdCB7IG9wZXJhdG9yOiBxdWVyeU9wZXJhdG9yLCB2YWx1ZTogcXVlcnlWYWx1ZSB9ID0gc2FuaXRpemVRdWVyeVZhbHVlKHtcbiAgICAgICAgICAgICAgICAgIGZpZWxkLFxuICAgICAgICAgICAgICAgICAgb3BlcmF0b3IsXG4gICAgICAgICAgICAgICAgICB2YWwsXG4gICAgICAgICAgICAgICAgfSlcblxuICAgICAgICAgICAgICAgIGlmIChxdWVyeU9wZXJhdG9yID09PSAnbm90X2VxdWFscycgJiYgcXVlcnlWYWx1ZSAhPT0gbnVsbCkge1xuICAgICAgICAgICAgICAgICAgY29uc3RyYWludHMucHVzaChcbiAgICAgICAgICAgICAgICAgICAgb3IoXG4gICAgICAgICAgICAgICAgICAgICAgaXNOdWxsKHJhd0NvbHVtbiB8fCB0YWJsZVtjb2x1bW5OYW1lXSksXG4gICAgICAgICAgICAgICAgICAgICAgLyogZXNsaW50LWRpc2FibGUgQHR5cGVzY3JpcHQtZXNsaW50L25vLWV4cGxpY2l0LWFueSAqL1xuICAgICAgICAgICAgICAgICAgICAgIG5lPGFueT4ocmF3Q29sdW1uIHx8IHRhYmxlW2NvbHVtbk5hbWVdLCBxdWVyeVZhbHVlKSxcbiAgICAgICAgICAgICAgICAgICAgKVxuICAgICAgICAgICAgICAgICAgKVxuICAgICAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgICBjb25zdHJhaW50cy5wdXNoKFxuICAgICAgICAgICAgICAgICAgICBvcGVyYXRvck1hcFtxdWVyeU9wZXJhdG9yXShyYXdDb2x1bW4gfHwgdGFibGVbY29sdW1uTmFtZV0sIHF1ZXJ5VmFsdWUpLFxuICAgICAgICAgICAgICAgICAgKVxuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfVxuICAgICAgICAgIH1cbiAgICAgICAgfVxuICAgICAgfVxuICAgIH1cbiAgfVxuICBpZiA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hdXG4gICAgICAgICAgaWYgKHR5cGVvZiBwYXRoT3BlcmF0b3JzID09PSAnb2JqZWN0Jykge1xuICAgICAgICAgICAgZm9yIChjb25zdCBvcGVyYXRvciBvZiBPYmplY3Qua2V5cyhwYXRoT3BlcmF0b3JzKSkge1xuICAgICAgICAgICAgICBpZiAodmFsaWRPcGVyYXRvcnMuaW5jbHVkZXMob3BlcmF0b3IgYXMgT3BlcmF0b3IpKSB7XG4gICAgICAgICAgICAgICAgY29uc3Qge1xuICAgICAgICAgICAgICAgICAgY29sdW1uTmFtZSxcbiAgICAgICAgICAgICAgICAgIGNvbnN0cmFpbnRzOiBxdWVyeUNvbnN0cmFpbnRzLFxuICAgICAgICAgICAgICAgICAgZmllbGQsXG4gICAgICAgICAgICAgICAgICBnZXROb3ROdWxsQ29sdW1uQnlWYWx1ZSxcbiAgICAgICAgICAgICAgICAgIHBhdGhTZWdtZW50cyxcbiAgICAgICAgICAgICAgICAgIHJhd0NvbHVtbixcbiAgICAgICAgICAgICAgICAgIHRhYmxlLFxuICAgICAgICAgICAgICAgIH0gPSBnZXRUYWJsZUNvbHVtbkZyb21QYXRoKHtcbiAgICAgICAgICAgICAgICAgIGFkYXB0ZXIsXG4gICAgICAgICAgICAgICAgICBjb2xsZWN0aW9uUGF0aDogcmVsYXRpb25PclBhdGgsXG4gICAgICAgICAgICAgICAgICBmaWVsZHMsXG4gICAgICAgICAgICAgICAgICBqb2luQWxpYXNlcyxcbiAgICAgICAgICAgICAgICAgIGpvaW5zLFxuICAgICAgICAgICAgICAgICAgbG9jYWxlLFxuICAgICAgICAgICAgICAgICAgcGF0aFNlZ21lbnRzOiByZWxhdGlvbk9yUGF0aC5yZXBsYWNlKC9fXy9nLCAnLicpLnNwbGl0KCcuJyksXG4gICAgICAgICAgICAgICAgICBzZWxlY3RGaWVsZHMsXG4gICAgICAgICAgICAgICAgICB0YWJsZU5hbWUsXG4gICAgICAgICAgICAgICAgfSlcblxuICAgICAgICAgICAgICAgIGNvbnN0IHZhbCA9IHdoZXJlW3JlbGF0aW9uT3JQYXRoXVtvcGVyYXRvcl1cblxuICAgICAgICAgICAgICAgIHF1ZXJ5Q29uc3RyYWludHMuZm9yRWFjaCgoeyBjb2x1bW5OYW1lOiBjb2wsIHRhYmxlOiBjb25zdHJhaW50VGFibGUsIHZhbHVlIH0pID0+IHtcbiAgICAgICAgICAgICAgICAgIGNvbnN0cmFpbnRzLnB1c2gob3BlcmF0b3JNYXAuZXF1YWxzKGNvbnN0cmFpbnRUYWJsZVtjb2xdLCB2YWx1ZSkpXG4gICAgICAgICAgICAgICAgfSlcblxuICAgICAgICAgICAgICAgIGlmIChbJ2pzb24nLCAncmljaFRleHQnXS5pbmNsdWRlcyhmaWVsZC50eXBlKSAmJiBBcnJheS5pc0FycmF5KHBhdGhTZWdtZW50cykpIHtcbiAgICAgICAgICAgICAgICAgIGNvbnN0IHNlZ21lbnRzID0gcGF0aFNlZ21lbnRzLnNsaWNlKDEpXG4gICAgICAgICAgICAgICAgICBzZWdtZW50cy51bnNoaWZ0KHRhYmxlW2NvbHVtbk5hbWVdLm5hbWUpXG5cbiAgICAgICAgICAgICAgICAgIGlmIChmaWVsZC50eXBlID09PSAncmljaFRleHQnKSB7XG4gICAgICAgICAgICAgICAgICAgIGNvbnN0IGpzb25RdWVyeSA9IGNyZWF0ZUpTT05RdWVyeSh7XG4gICAgICAgICAgICAgICAgICAgICAgb3BlcmF0b3IsXG4gICAgICAgICAgICAgICAgICAgICAgcGF0aFNlZ21lbnRzOiBzZWdtZW50cyxcbiAgICAgICAgICAgICAgICAgICAgICB0cmVhdEFzQXJyYXk6IFsnY2hpbGRyZW4nXSxcbiAgICAgICAgICAgICAgICAgICAgICB0cmVhdFJvb3RBc0FycmF5OiB0cnVlLFxuICAgICAgICAgICAgICAgICAgICAgIHZhbHVlOiB2YWwsXG4gICAgICAgICAgICAgICAgICAgIH0pXG5cbiAgICAgICAgICAgICAgICAgICAgY29uc3RyYWludHMucHVzaChzcWwucmF3KGpzb25RdWVyeSkpXG4gICAgICAgICAgICAgICAgICB9XG5cbiAgICAgICAgICAgICAgICAgIGlmIChmaWVsZC50eXBlID09PSAnanNvbicpIHtcbiAgICAgICAgICAgICAgICAgICAgY29uc3QganNvblF1ZXJ5ID0gY29udmVydFBhdGhUb0pTT05UcmF2ZXJzYWwocGF0aFNlZ21lbnRzKVxuICAgICAgICAgICAgICAgICAgICBjb25zdHJhaW50cy5wdXNoKHNxbC5yYXcoYCR7dGFibGVbY29sdW1uTmFtZV0ubmFtZX0ke2pzb25RdWVyeX0gPSAnJSR7dmFsfSUnYCkpXG4gICAgICAgICAgICAgICAgICB9XG5cbiAgICAgICAgICAgICAgICAgIGJyZWFrXG4gICAgICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICAgICAgaWYgKGdldE5vdE51bGxDb2x1bW5CeVZhbHVlKSB7XG4gICAgICAgICAgICAgICAgICBjb25zdCBjb2x1bW5OYW1lID0gZ2V0Tm90TnVsbENvbHVtbkJ5VmFsdWUodmFsKVxuICAgICAgICAgICAgICAgICAgaWYgKGNvbHVtbk5hbWUpIHtcbiAgICAgICAgICAgICAgICAgICAgY29uc3RyYWludHMucHVzaChpc05vdE51bGwodGFibGVbY29sdW1uTmFtZV0pKVxuICAgICAgICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICAgICAgdGhyb3cgbmV3IFF1ZXJ5RXJyb3IoW3sgcGF0aDogcmVsYXRpb25PclBhdGggfV0pXG4gICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICBicmVha1xuICAgICAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgICAgIGlmIChvcGVyYXRvciA9PT0gJ2xpa2UnKSB7XG4gICAgICAgICAgICAgICAgICBjb25zdHJhaW50cy5wdXNoKFxuICAgICAgICAgICAgICAgICAgICBhbmQoLi4udmFsLnNwbGl0KCcgJykubWFwKCh3b3JkKSA9PiBpbGlrZSh0YWJsZVtjb2x1bW5OYW1lXSwgYCUke3dvcmR9JWApKSksXG4gICAgICAgICAgICAgICAgICApXG4gICAgICAgICAgICAgICAgICBicmVha1xuICAgICAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgICAgIGNvbnN0IHsgb3BlcmF0b3I6IHF1ZXJ5T3BlcmF0b3IsIHZhbHVlOiBxdWVyeVZhbHVlIH0gPSBzYW5pdGl6ZVF1ZXJ5VmFsdWUoe1xuICAgICAgICAgICAgICAgICAgZmllbGQsXG4gICAgICAgICAgICAgICAgICBvcGVyYXRvcixcbiAgICAgICAgICAgICAgICAgIHZhbCxcbiAgICAgICAgICAgICAgICB9KVxuXG4gICAgICAgICAgICAgICAgaWYgKHF1ZXJ5T3BlcmF0b3IgPT09ICdub3RfZXF1YWxzJyAmJiBxdWVyeVZhbHVlICE9PSBudWxsKSB7XG4gICAgICAgICAgICAgICAgICBjb25zdHJhaW50cy5wdXNoKFxuICAgICAgICAgICAgICAgICAgICBvcihcbiAgICAgICAgICAgICAgICAgICAgICBpc051bGwocmF3Q29sdW1uIHx8IHRhYmxlW2NvbHVtbk5hbWVdKSxcbiAgICAgICAgICAgICAgICAgICAgICAvKiBlc2xpbnQtZGlzYWJsZSBAdHlwZXNjcmlwdC1lc2xpbnQvbm8tZXhwbGljaXQtYW55ICovXG4gICAgICAgICAgICAgICAgICAgICAgbmU8YW55PihyYXdDb2x1bW4gfHwgdGFibGVbY29sdW1uTmFtZV0sIHF1ZXJ5VmFsdWUpLFxuICAgICAgICAgICAgICAgICAgICApLFxuICAgICAgICAgICAgICAgICAgKVxuICAgICAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgICBjb25zdHJhaW50cy5wdXNoKFxuICAgICAgICAgICAgICAgICAgICBvcGVyYXRvck1hcFtxdWVyeU9wZXJhdG9yXShyYXdDb2x1bW4gfHwgdGFibGVbY29sdW1uTmFtZV0sIHF1ZXJ5VmFsdWUpLFxuICAgICAgICAgICAgICAgICAgKVxuICAgICAgICAgICAgICAgIH1cbiAgIC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DLElBQUFBLGtCQUFNLEVBQUNwQyxhQUFhQyxLQUFLLENBQUNOLFdBQVcsR0FDckMscURBQXFELEdBQ3JEMEMsSUFBQUEsY0FBRSxFQUFNckMsYUFBYUMsS0FBSyxDQUFDTixXQUFXLEVBQUVzQztnQ0FHOUMsT0FBTztvQ0FDTHZELFlBQVlpQyxJQUFJLENBQ2RyQix3QkFBVyxDQUFDMEMsY0FBYyxDQUFDaEMsYUFBYUMsS0FBSyxDQUFDTixXQUFXLEVBQUVzQztnQ0FFL0Q7NEJBQ0Y7d0JBQ0Y7b0JBQ0Y7Z0JBQ0Y7WUFDRjtRQUNGO0lBQ0Y7SUFDQSxJQUFJdkQsWUFBWUcsTUFBTSxHQUFHLEdBQUc7UUFDMUIsSUFBSUosUUFBUTtZQUNWQSxTQUFTbUQsSUFBQUEsZUFBRyxFQUFDbkQsV0FBV0M7UUFDMUIsT0FBTztZQUNMRCxTQUFTbUQsSUFBQUEsZUFBRyxLQUFJbEQ7UUFDbEI7SUFDRjtJQUNBLElBQUlBLFlBQVlHLE1BQU0sS0FBSyxLQUFLLENBQUNKLFFBQVE7UUFDdEMsQ0FBQ0EsT0FBTyxHQUFHQztJQUNkO0lBRUEsT0FBT0Q7QUFDVCJ9
@@ -23,7 +23,7 @@ const beginTransaction = async function beginTransaction() {
23
23
  // so instead, we "lift" up the `resolve` and `reject` methods
24
24
  // and will call them in our respective transaction methods
25
25
  // eslint-disable-next-line @typescript-eslint/no-floating-promises
26
- this.db.transaction(async (tx)=>{
26
+ this.drizzle.transaction(async (tx)=>{
27
27
  transaction = tx;
28
28
  await new Promise((res, rej)=>{
29
29
  transactionReady();
@@ -48,4 +48,4 @@ const beginTransaction = async function beginTransaction() {
48
48
  return id;
49
49
  };
50
50
 
51
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy90cmFuc2FjdGlvbnMvYmVnaW5UcmFuc2FjdGlvbi50cyJdLCJzb3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LQztnQkFDdEJMO2dCQUNBRixVQUFVTTtnQkFDVlAsU0FBU1E7WUFDWDtRQUNGLEdBQ0NDLEtBQUssQ0FBQztRQUNMLFVBQVU7UUFDWjtRQUVGLDhDQUE4QztRQUM5QywwREFBMEQ7UUFDMUQsTUFBTSxJQUFJSCxRQUFRLENBQUNMLFVBQWFFLG1CQUFtQkY7UUFFbkQsSUFBSSxDQUFDUyxRQUFRLENBQUNaLEdBQUcsR0FBRztZQUNsQmEsSUFBSVQ7WUFDSkY7WUFDQUM7UUFDRjtJQUNGLEVBQUUsT0FBT1csS0FBSztRQUNaLElBQUksQ0FBQ0MsT0FBTyxDQUFDQyxNQUFNLENBQUNDLEtBQUssQ0FBQyxDQUFDLGlDQUFpQyxFQUFFSCxJQUFJSSxPQUFPLENBQUMsQ0FBQyxFQUFFSjtRQUM3RUssUUFBUUMsSUFBSSxDQUFDO0lBQ2Y7SUFFQSxPQUFPcEI7QUFDVCJ9
package/dist/update.js CHANGED
@@ -17,7 +17,7 @@ function _interop_require_default(obj) {
17
17
  };
18
18
  }
19
19
  const updateOne = async function updateOne({ id, collection: collectionSlug, data, draft, locale, req, where: whereArg }) {
20
- const db = this.sessions[req.transactionID]?.db || this.db;
20
+ const db = this.sessions[req.transactionID]?.db || this.drizzle;
21
21
  const collection = this.payload.collections[collectionSlug].config;
22
22
  const tableName = (0, _tosnakecase.default)(collectionSlug);
23
23
  const whereToUse = whereArg || {
@@ -45,4 +45,4 @@ const updateOne = async function updateOne({ id, collection: collectionSlug, dat
45
45
  return result;
46
46
  };
47
47
 
48
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uL3NyYy91cGRhdGUudHMiXSwic291cmNlc0NvbnRlbnQiOlsiaW1wb3J0IHR5cGUgeyBVcGRhdGVPbmUgfSBmcm9tICdwYXlsb2FkL2RhdGFiYXNlJ1xuXG5pbXBvcnQgdG9TbmFrZUNhc2UgZnJvbSAndG8tc25ha2UtY2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BQUEsb0JBQVMsRUFBQztRQUM3QnhCO1FBQ0FxQixTQUFTLElBQUk7UUFDYmxCO1FBQ0FNO1FBQ0FhLFFBQVFyQixXQUFXcUIsTUFBTTtRQUN6QkcsV0FBVztRQUNYVCxXQUFXQyxJQUFBQSxvQkFBVyxFQUFDZjtRQUN2Qks7SUFDRjtJQUVBLE9BQU9nQjtBQUNUIn0=
@@ -16,7 +16,7 @@ function _interop_require_default(obj) {
16
16
  };
17
17
  }
18
18
  async function updateGlobal({ data, req = {}, slug }) {
19
- const db = this.sessions[req.transactionID]?.db || this.db;
19
+ const db = this.sessions[req.transactionID]?.db || this.drizzle;
20
20
  const globalConfig = this.payload.globals.config.find((config)=>config.slug === slug);
21
21
  const tableName = (0, _tosnakecase.default)(slug);
22
22
  const existingGlobal = await db.query[tableName].findFirst({});
@@ -36,4 +36,4 @@ async function updateGlobal({ data, req = {}, slug }) {
36
36
  return result;
37
37
  }
38
38
 
39
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uL3NyYy91cGRhdGVHbG9iYWwudHMiXSwic291cmNlc0NvbnRlbnQiOlsiaW1wb3J0IHR5cGUgeyBVcGRhdGVHbG9iYWxBcmdzIH0gZnJvbSAncGF5bG9hZC9kYXRhYmFzZSdcbmltcG9ydCB0eXBlIHsgUGF5bG9hZFJlcXVlc3QsIFR5cGVXaXRoSUQgfSBmcm9tICdwYXlsb2FkL3R5cGVzJ1xuXG5pbXBvcnQgdG9TbmFrZUNhc2UgZnJvbSAndG8tc25ha2UtY2FzZSdcblxuaW1wb3J0IHR5cGUgeyBQb3N0Z3Jlc0FkYXB0ZXIgfSBmcm9tICcuL3R5cGVzJ1xuXG5pbXBvcnQgeyB1cHNlcnRSb3cgfSBmcm9tICcuL3Vwc2VydFJvdydcblxuZXhwb3J0IGFzeW5jIGZ1bmN0aW9uIHVwZGF0ZUdsb2JhbDxUIGV4dGVuZHMgVHlwZVdpdGhJRD4oXG4gI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QUssQ0FBQ0gsVUFBVSxDQUFDSSxTQUFTLENBQUMsQ0FBQztJQUU1RCxNQUFNQyxTQUFTLE1BQU1DLElBQUFBLG9CQUFTLEVBQUk7UUFDaEMsR0FBSUosaUJBQWlCO1lBQUVLLElBQUlMLGVBQWVLLEVBQUU7WUFBRUMsV0FBVztRQUFTLElBQUk7WUFBRUEsV0FBVztRQUFTLENBQUM7UUFDN0ZDLFNBQVMsSUFBSTtRQUNickI7UUFDQUc7UUFDQW1CLFFBQVFmLGFBQWFlLE1BQU07UUFDM0JWO0lBQ0Y7SUFFQSxPQUFPSztBQUNUIn0=
@@ -18,7 +18,7 @@ function _interop_require_default(obj) {
18
18
  };
19
19
  }
20
20
  async function updateGlobalVersion({ id, global, locale, req = {}, versionData, where: whereArg }) {
21
- const db = this.sessions[req.transactionID]?.db || this.db;
21
+ const db = this.sessions[req.transactionID]?.db || this.drizzle;
22
22
  const globalConfig = this.payload.globals.config.find(({ slug })=>slug === global);
23
23
  const whereToUse = whereArg || {
24
24
  id: {
@@ -47,4 +47,4 @@ async function updateGlobalVersion({ id, global, locale, req = {}, versionData,
47
47
  return result;
48
48
  }
49
49
 
50
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uL3NyYy91cGRhdGVHbG9iYWxWZXJzaW9uLnRzIl0sInNvdXJjZXNDb250ZW50IjpbImltcG9ydCB0eXBlIHsgVHlwZVdpdGhWZXJzaW9uIH0gZnJvbSAncGF5bG9hZC9kYXRhYmFzZSdcbmltcG9ydCB0eXBlIHsgVXBkYXRlR2xvYmFsVmVyc2lvbkFyZ3MgfSBmcm9tICdwYXlsb2FkL2RhdGFiYXNlJ1xuaW1wb3J0IHR5cGUgeyBQYXlsb2FkUmVxdWVzdCwgU2FuaXRpemVkR2xvYmFsQ29uZmlnLCBUeXBlV2l0aElEIH0gZnJvbSAncGF5bG9hZC90eXBlcydcblxuaW1wb3J0IHsgYnVpbGRWZXJzaW9uR2x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SxNQUFNUSxTQUFTLE1BQU1DLElBQUFBLG9CQUFTLEVBQXFCO1FBQ2pEMUI7UUFDQXdCLFNBQVMsSUFBSTtRQUNiRyxNQUFNdkI7UUFDTkc7UUFDQWM7UUFDQU8sV0FBVztRQUNYVDtRQUNBZDtJQUNGO0lBRUEsT0FBT29CO0FBQ1QifQ==
@@ -18,7 +18,7 @@ function _interop_require_default(obj) {
18
18
  };
19
19
  }
20
20
  async function updateVersion({ id, collection, locale, req = {}, versionData, where: whereArg }) {
21
- const db = this.sessions[req.transactionID]?.db || this.db;
21
+ const db = this.sessions[req.transactionID]?.db || this.drizzle;
22
22
  const collectionConfig = this.payload.collections[collection].config;
23
23
  const whereToUse = whereArg || {
24
24
  id: {
@@ -47,4 +47,4 @@ async function updateVersion({ id, collection, locale, req = {}, versionData, wh
47
47
  return result;
48
48
  }
49
49
 
50
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uL3NyYy91cGRhdGVWZXJzaW9uLnRzIl0sInNvdXJjZXNDb250ZW50IjpbImltcG9ydCB0eXBlIHsgVHlwZVdpdGhWZXJzaW9uLCBVcGRhdGVWZXJzaW9uQXJncyB9IGZyb20gJ3BheWxvYWQvZGF0YWJhc2UnXG5pbXBvcnQgdHlwZSB7IFBheWxvYWRSZXF1ZXN0LCBTYW5pdGl6ZWRDb2xsZWN0aW9uQ29uZmlnLCBUeXBlV2l0aElEIH0gZnJvbSAncGF5bG9hZC90eXBlcydcblxuaW1wb3J0IHsgYnVpbGRWZXJzaW9uQ29sbGVjdGlvbkZpZWxkcyB9IGZyb20gJ3BheWxvYWQvdmVyc2lvbnMnXG5pbXBvcnQgdG9TbmFrZUNhc2UgZnJvbSAndG8tc25ha2UtY2FzZSdcblxuaW1wb3J0IHR5cGUgeyBQb3N0Z3Jlc0FkYXB0ZXIgfSBmcm9tICcuL3R5cGVzJ1xuXG5pbXBvcnQgYnVpbGRRdWVyeSBmcm9tICcuL3F1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DQUFtQixFQUMxQkMsV0FBVyxFQUNYQyxPQUFPQyxRQUFRLEVBQ007SUFFdkIsTUFBTUMsS0FBSyxJQUFJLENBQUNDLFFBQVEsQ0FBQ0wsSUFBSU0sYUFBYSxDQUFDLEVBQUVGLE1BQU0sSUFBSSxDQUFDRyxPQUFPO0lBQy9ELE1BQU1DLG1CQUE4QyxJQUFJLENBQUNDLE9BQU8sQ0FBQ0MsV0FBVyxDQUFDWixXQUFXLENBQUNhLE1BQU07SUFDL0YsTUFBTUMsYUFBYVQsWUFBWTtRQUFFTixJQUFJO1lBQUVnQixRQUFRaEI7UUFBRztJQUFFO0lBQ3BELE1BQU1pQixZQUFZLENBQUMsQ0FBQyxFQUFFQyxJQUFBQSxvQkFBVyxFQUFDakIsWUFBWSxFQUFFLENBQUM7SUFDakQsTUFBTWtCLFNBQVNDLElBQUFBLHNDQUE0QixFQUFDVDtJQUU1QyxNQUFNLEVBQUVOLEtBQUssRUFBRSxHQUFHLE1BQU1nQixJQUFBQSxtQkFBVSxFQUFDO1FBQ2pDQyxTQUFTLElBQUk7UUFDYkg7UUFDQWpCO1FBQ0FlO1FBQ0FaLE9BQU9VO0lBQ1Q7SUFFQSxNQUFNUSxTQUFTLE1BQU1DLElBQUFBLG9CQUFTLEVBQXFCO1FBQ2pEeEI7UUFDQXNCLFNBQVMsSUFBSTtRQUNiRyxNQUFNckI7UUFDTkc7UUFDQVk7UUFDQU8sV0FBVztRQUNYVDtRQUNBWjtJQUNGO0lBRUEsT0FBT2tCO0FBQ1QifQ==
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@payloadcms/db-postgres",
3
- "version": "0.1.0-beta.1",
3
+ "version": "0.1.0-beta.6",
4
4
  "description": "The officially supported Postgres database adapter for Payload",
5
5
  "repository": "https://github.com/payloadcms/payload",
6
6
  "license": "MIT",
@@ -24,7 +24,7 @@
24
24
  "devDependencies": {
25
25
  "@types/pg": "8.10.2",
26
26
  "@types/to-snake-case": "1.0.0",
27
- "payload": "2.0.0-beta.2",
27
+ "payload": "2.0.0-beta.0",
28
28
  "@payloadcms/eslint-config": "0.0.1"
29
29
  },
30
30
  "peerDependencies": {
package/src/index.ts CHANGED
@@ -37,13 +37,13 @@ import { webpack } from './webpack'
37
37
 
38
38
  export function postgresAdapter(args: Args): PostgresAdapterResult {
39
39
  function adapter({ payload }: { payload: Payload }) {
40
- const migrationDir = args.migrationDir || path.resolve(__dirname, '../../../migrations')
40
+ const migrationDir = args.migrationDir || path.resolve(process.cwd(), 'src/migrations')
41
41
  return createDatabaseAdapter<PostgresAdapter>({
42
42
  ...args,
43
43
  name: 'postgres',
44
44
 
45
45
  // Postgres-specific
46
- db: undefined,
46
+ drizzle: undefined,
47
47
  enums: {},
48
48
  pool: undefined,
49
49
  relations: {},