@payloadcms/db-postgres 0.8.1 → 0.8.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (76) hide show
  1. package/dist/count.d.ts.map +1 -1
  2. package/dist/count.js +3 -6
  3. package/dist/create.d.ts.map +1 -1
  4. package/dist/create.js +9 -6
  5. package/dist/createGlobal.d.ts.map +1 -1
  6. package/dist/createGlobal.js +9 -6
  7. package/dist/createGlobalVersion.d.ts.map +1 -1
  8. package/dist/createGlobalVersion.js +11 -10
  9. package/dist/createVersion.d.ts.map +1 -1
  10. package/dist/createVersion.js +22 -21
  11. package/dist/deleteMany.d.ts.map +1 -1
  12. package/dist/deleteMany.js +8 -6
  13. package/dist/deleteOne.d.ts.map +1 -1
  14. package/dist/deleteOne.js +3 -6
  15. package/dist/deleteVersions.d.ts.map +1 -1
  16. package/dist/deleteVersions.js +8 -7
  17. package/dist/find/traverseFields.d.ts.map +1 -1
  18. package/dist/find/traverseFields.js +13 -22
  19. package/dist/find.d.ts.map +1 -1
  20. package/dist/find.js +8 -6
  21. package/dist/findGlobal.d.ts.map +1 -1
  22. package/dist/findGlobal.js +8 -6
  23. package/dist/findGlobalVersions.d.ts.map +1 -1
  24. package/dist/findGlobalVersions.js +8 -7
  25. package/dist/findOne.d.ts.map +1 -1
  26. package/dist/findOne.js +8 -6
  27. package/dist/findVersions.d.ts.map +1 -1
  28. package/dist/findVersions.js +8 -7
  29. package/dist/index.d.ts.map +1 -1
  30. package/dist/index.js +6 -8
  31. package/dist/init.d.ts.map +1 -1
  32. package/dist/init.js +10 -8
  33. package/dist/queries/getTableColumnFromPath.d.ts.map +1 -1
  34. package/dist/queries/getTableColumnFromPath.js +12 -41
  35. package/dist/queries/parseParams.js +2 -2
  36. package/dist/queryDrafts.d.ts.map +1 -1
  37. package/dist/queryDrafts.js +8 -7
  38. package/dist/schema/build.d.ts +4 -3
  39. package/dist/schema/build.d.ts.map +1 -1
  40. package/dist/schema/build.js +86 -45
  41. package/dist/schema/{getTableName.d.ts → createTableName.d.ts} +5 -7
  42. package/dist/schema/createTableName.d.ts.map +1 -0
  43. package/dist/schema/createTableName.js +43 -0
  44. package/dist/schema/traverseFields.d.ts.map +1 -1
  45. package/dist/schema/traverseFields.js +40 -18
  46. package/dist/schema/validateExistingBlockIsIdentical.d.ts.map +1 -1
  47. package/dist/schema/validateExistingBlockIsIdentical.js +1 -1
  48. package/dist/transform/read/hasManyText.d.ts +2 -2
  49. package/dist/transform/read/hasManyText.d.ts.map +1 -1
  50. package/dist/transform/read/hasManyText.js +2 -2
  51. package/dist/transform/read/index.js +3 -3
  52. package/dist/transform/write/array.d.ts +2 -2
  53. package/dist/transform/write/array.d.ts.map +1 -1
  54. package/dist/transform/write/array.js +4 -4
  55. package/dist/transform/write/blocks.js +2 -2
  56. package/dist/transform/write/index.js +5 -5
  57. package/dist/transform/write/texts.js +3 -3
  58. package/dist/transform/write/traverseFields.d.ts.map +1 -1
  59. package/dist/transform/write/traverseFields.js +6 -15
  60. package/dist/transform/write/types.d.ts +1 -1
  61. package/dist/transform/write/types.d.ts.map +1 -1
  62. package/dist/types.d.ts +3 -6
  63. package/dist/types.d.ts.map +1 -1
  64. package/dist/update.d.ts.map +1 -1
  65. package/dist/update.js +3 -6
  66. package/dist/updateGlobal.d.ts.map +1 -1
  67. package/dist/updateGlobal.js +8 -6
  68. package/dist/updateGlobalVersion.d.ts.map +1 -1
  69. package/dist/updateGlobalVersion.js +3 -7
  70. package/dist/updateVersion.d.ts.map +1 -1
  71. package/dist/updateVersion.js +3 -7
  72. package/dist/upsertRow/index.js +3 -3
  73. package/dist/upsertRow/insertArrays.js +2 -2
  74. package/package.json +3 -3
  75. package/dist/schema/getTableName.d.ts.map +0 -1
  76. package/dist/schema/getTableName.js +0 -43
package/dist/find.js CHANGED
@@ -8,15 +8,17 @@ Object.defineProperty(exports, "find", {
8
8
  return find;
9
9
  }
10
10
  });
11
+ const _tosnakecase = /*#__PURE__*/ _interop_require_default(require("to-snake-case"));
11
12
  const _findMany = require("./find/findMany");
12
- const _getTableName = require("./schema/getTableName");
13
+ function _interop_require_default(obj) {
14
+ return obj && obj.__esModule ? obj : {
15
+ default: obj
16
+ };
17
+ }
13
18
  const find = async function find({ collection, limit, locale, page = 1, pagination, req = {}, sort: sortArg, where }) {
14
19
  const collectionConfig = this.payload.collections[collection].config;
15
20
  const sort = typeof sortArg === 'string' ? sortArg : collectionConfig.defaultSort;
16
- const tableName = (0, _getTableName.getTableName)({
17
- adapter: this,
18
- config: collectionConfig
19
- });
21
+ const tableName = this.tableNameMap.get((0, _tosnakecase.default)(collectionConfig.slug));
20
22
  return (0, _findMany.findMany)({
21
23
  adapter: this,
22
24
  fields: collectionConfig.fields,
@@ -31,4 +33,4 @@ const find = async function find({ collection, limit, locale, page = 1, paginati
31
33
  });
32
34
  };
33
35
 
34
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uL3NyYy9maW5kLnRzIl0sInNvdXJjZXNDb250ZW50IjpbImltcG9ydCB0eXBlIHsgRmluZCB9IGZyb20gJ3BheWxvYWQvZGF0YWJhc2UnXG5pbXBvcnQgdHlwZSB7IFBheWxvYWRSZXF1ZXN0LCBTYW5pdGl6ZWRDb2xsZWN0aW9uQ29uZmlnIH0gZnJvbSAncGF5bG9hZC90eXBlcydcblxuaW1wb3J0IHR5cGUgeyBQb3N0Z3Jlc0FkYXB0ZXIgfSBmcm9tICcuL3R5cGVzJ1xuXG5pbXBvcnQgeyBmaW5kTWFueSB9IGZyb20gJy4vZmluZC9maW5kTWFueSdcbmltcG9ydCB7IGdldFRhYmxlTmFtZSB9IGZyb20gJy4vc2NoZW1hL2dldFRhYmxlTmFtZSdcblxuZXhwb3J0IGNvbnN0IGZpbmQ6IEZpbmQgPSBhc3luYyBmdW5jdGlvbiBmaW5kKFxuICB0aGlzOiBQb3N0Z3Jlc0FkYXB0ZXIsXG4gIHtcbiAgICBjb2xsZWN0aW9uLFxuICAgIGxpbWl0LFxuICAgIGxvY2FsZSxcbiAgICB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AU,EAAE,MAAM,kBAAkB,CAAA;AAOlD,eAAO,MAAM,UAAU,EAAE,UA6BxB,CAAA"}
1
+ {"version":3,"file":"findGlobal.d.ts","sourceRoot":"","sources":["../src/findGlobal.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAA;AAQlD,eAAO,MAAM,UAAU,EAAE,UA2BxB,CAAA"}
@@ -8,14 +8,16 @@ Object.defineProperty(exports, "findGlobal", {
8
8
  return findGlobal;
9
9
  }
10
10
  });
11
+ const _tosnakecase = /*#__PURE__*/ _interop_require_default(require("to-snake-case"));
11
12
  const _findMany = require("./find/findMany");
12
- const _getTableName = require("./schema/getTableName");
13
+ function _interop_require_default(obj) {
14
+ return obj && obj.__esModule ? obj : {
15
+ default: obj
16
+ };
17
+ }
13
18
  const findGlobal = async function findGlobal({ slug, locale, req, where }) {
14
19
  const globalConfig = this.payload.globals.config.find((config)=>config.slug === slug);
15
- const tableName = (0, _getTableName.getTableName)({
16
- adapter: this,
17
- config: globalConfig
18
- });
20
+ const tableName = this.tableNameMap.get((0, _tosnakecase.default)(globalConfig.slug));
19
21
  const { docs: [doc] } = await (0, _findMany.findMany)({
20
22
  adapter: this,
21
23
  fields: globalConfig.fields,
@@ -33,4 +35,4 @@ const findGlobal = async function findGlobal({ slug, locale, req, where }) {
33
35
  return {};
34
36
  };
35
37
 
36
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uL3NyYy9maW5kR2xvYmFsLnRzIl0sInNvdXJjZXNDb250ZW50IjpbImltcG9ydCB0eXBlIHsgRmluZEdsb2JhbCB9IGZyb20gJ3BheWxvYWQvZGF0YWJhc2UnXG5cbmltcG9ydCB0eXBlIHsgUG9zdGdyZXNBZGFwdGVyIH0gZnJvbSAnLi90eXBlcydcblxuaW1wb3J0IHsgZmluZE1hbnkgfSBmcm9tICcuL2ZpbmQvZmluZE1hbnknXG5pbXBvcnQgey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yIsImRvYyIsImZpbmRNYW55IiwiYWRhcHRlciIsImZpZWxkcyIsImxpbWl0IiwicGFnaW5hdGlvbiIsImdsb2JhbFR5cGUiXSwibWFwcGluZ3MiOiI7Ozs7K0JBUWFBOzs7ZUFBQUE7OztvRUFOVzswQkFJQzs7Ozs7O0FBRWxCLE1BQU1BLGFBQXlCLGVBQWVBLFdBRW5ELEVBQUVDLElBQUksRUFBRUMsTUFBTSxFQUFFQyxHQUFHLEVBQUVDLEtBQUssRUFBRTtJQUU1QixNQUFNQyxlQUFlLElBQUksQ0FBQ0MsT0FBTyxDQUFDQyxPQUFPLENBQUNDLE1BQU0sQ0FBQ0MsSUFBSSxDQUFDLENBQUNELFNBQVdBLE9BQU9QLElBQUksS0FBS0E7SUFFbEYsTUFBTVMsWUFBWSxJQUFJLENBQUNDLFlBQVksQ0FBQ0MsR0FBRyxDQUFDQyxJQUFBQSxvQkFBVyxFQUFDUixhQUFhSixJQUFJO0lBRXJFLE1BQU0sRUFDSmEsTUFBTSxDQUFDQyxJQUFJLEVBQ1osR0FBRyxNQUFNQyxJQUFBQSxrQkFBUSxFQUFDO1FBQ2pCQyxTQUFTLElBQUk7UUFDYkMsUUFBUWIsYUFBYWEsTUFBTTtRQUMzQkMsT0FBTztRQUNQakI7UUFDQWtCLFlBQVk7UUFDWmpCO1FBQ0FPO1FBQ0FOO0lBQ0Y7SUFFQSxJQUFJVyxLQUFLO1FBQ1BBLElBQUlNLFVBQVUsR0FBR3BCO1FBQ2pCLE9BQU9jO0lBQ1Q7SUFFQSxPQUFPLENBQUM7QUFDViJ9
@@ -1 +1 @@
1
- {"version":3,"file":"findGlobalVersions.d.ts","sourceRoot":"","sources":["../src/findGlobalVersions.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,kBAAkB,CAAA;AAU1D,eAAO,MAAM,kBAAkB,EAAE,kBAuChC,CAAA"}
1
+ {"version":3,"file":"findGlobalVersions.d.ts","sourceRoot":"","sources":["../src/findGlobalVersions.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,kBAAkB,CAAA;AAU1D,eAAO,MAAM,kBAAkB,EAAE,kBAsChC,CAAA"}
@@ -9,16 +9,17 @@ Object.defineProperty(exports, "findGlobalVersions", {
9
9
  }
10
10
  });
11
11
  const _versions = require("payload/versions");
12
+ const _tosnakecase = /*#__PURE__*/ _interop_require_default(require("to-snake-case"));
12
13
  const _findMany = require("./find/findMany");
13
- const _getTableName = require("./schema/getTableName");
14
+ function _interop_require_default(obj) {
15
+ return obj && obj.__esModule ? obj : {
16
+ default: obj
17
+ };
18
+ }
14
19
  const findGlobalVersions = async function findGlobalVersions({ global, limit, locale, page, pagination, req = {}, skip, sort: sortArg, where }) {
15
20
  const globalConfig = this.payload.globals.config.find(({ slug })=>slug === global);
16
21
  const sort = typeof sortArg === 'string' ? sortArg : '-createdAt';
17
- const tableName = (0, _getTableName.getTableName)({
18
- adapter: this,
19
- config: globalConfig,
20
- versions: true
21
- });
22
+ const tableName = this.tableNameMap.get(`_${(0, _tosnakecase.default)(globalConfig.slug)}${this.versionsSuffix}`);
22
23
  const fields = (0, _versions.buildVersionGlobalFields)(globalConfig);
23
24
  return (0, _findMany.findMany)({
24
25
  adapter: this,
@@ -35,4 +36,4 @@ const findGlobalVersions = async function findGlobalVersions({ global, limit, lo
35
36
  });
36
37
  };
37
38
 
38
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uL3NyYy9maW5kR2xvYmFsVmVyc2lvbnMudHMiXSwic291cmNlc0NvbnRlbnQiOlsiaW1wb3J0IHR5cGUgeyBGaW5kR2xvYmFsVmVyc2lvbnMgfSBmcm9tICdwYXlsb2FkL2RhdGFiYXNlJ1xuaW1wb3J0IHR5cGUgeyBQYXlsb2FkUmVxdWVzdCwgU2FuaXRpemVkR2xvYmFsQ29uZmlnIH0gZnJvbSAncGF5bG9hZC90eXBlcydc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Uk7UUFDYkg7UUFDQXBCO1FBQ0FDO1FBQ0FDO1FBQ0FDO1FBQ0FDO1FBQ0FDO1FBQ0FDO1FBQ0FTO1FBQ0FQO0lBQ0Y7QUFDRiJ9
@@ -1 +1 @@
1
- {"version":3,"file":"findOne.d.ts","sourceRoot":"","sources":["../src/findOne.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAA;AACnD,OAAO,KAAK,EAA6C,UAAU,EAAE,MAAM,eAAe,CAAA;AAE1F,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,SAAS,CAAA;AAK9C,wBAAsB,OAAO,CAAC,CAAC,SAAS,UAAU,EAChD,IAAI,EAAE,eAAe,EACrB,EAAE,UAAU,EAAE,MAAM,EAAE,GAA0B,EAAE,KAAK,EAAE,EAAE,WAAW,GACrE,OAAO,CAAC,CAAC,CAAC,CAqBZ"}
1
+ {"version":3,"file":"findOne.d.ts","sourceRoot":"","sources":["../src/findOne.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAA;AACnD,OAAO,KAAK,EAA6C,UAAU,EAAE,MAAM,eAAe,CAAA;AAI1F,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,SAAS,CAAA;AAI9C,wBAAsB,OAAO,CAAC,CAAC,SAAS,UAAU,EAChD,IAAI,EAAE,eAAe,EACrB,EAAE,UAAU,EAAE,MAAM,EAAE,GAA0B,EAAE,KAAK,EAAE,EAAE,WAAW,GACrE,OAAO,CAAC,CAAC,CAAC,CAmBZ"}
package/dist/findOne.js CHANGED
@@ -8,14 +8,16 @@ Object.defineProperty(exports, "findOne", {
8
8
  return findOne;
9
9
  }
10
10
  });
11
+ const _tosnakecase = /*#__PURE__*/ _interop_require_default(require("to-snake-case"));
11
12
  const _findMany = require("./find/findMany");
12
- const _getTableName = require("./schema/getTableName");
13
+ function _interop_require_default(obj) {
14
+ return obj && obj.__esModule ? obj : {
15
+ default: obj
16
+ };
17
+ }
13
18
  async function findOne({ collection, locale, req = {}, where }) {
14
19
  const collectionConfig = this.payload.collections[collection].config;
15
- const tableName = (0, _getTableName.getTableName)({
16
- adapter: this,
17
- config: collectionConfig
18
- });
20
+ const tableName = this.tableNameMap.get((0, _tosnakecase.default)(collectionConfig.slug));
19
21
  const { docs } = await (0, _findMany.findMany)({
20
22
  adapter: this,
21
23
  fields: collectionConfig.fields,
@@ -31,4 +33,4 @@ async function findOne({ collection, locale, req = {}, where }) {
31
33
  return docs?.[0] || null;
32
34
  }
33
35
 
34
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uL3NyYy9maW5kT25lLnRzIl0sInNvdXJjZXNDb250ZW50IjpbImltcG9ydCB0eXBlIHsgRmluZE9uZUFyZ3MgfSBmcm9tICdwYXlsb2FkL2RhdGFiYXNlJ1xuaW1wb3J0IHR5cGUgeyBQYXlsb2FkUmVxdWVzdCwgU2FuaXRpemVkQ29sbGVjdGlvbkNvbmZpZywgVHlwZVdpdGhJRCB9IGZyb20gJ3BheWxvYWQvdHlwZXMnXG5cbmltcG9ydCB0eXBlIHsgUG9zdGdyZXNBZGFwdGVyIH0gZnJvbSAnLi90eXBlcydcblxuaW1wb3J0IHsgZmluZE1hbnkgfSBmcm9tICcuL2ZpbmQvZmluZE1hbnknXG5pbXBvcnQgeyBnZXRUYWJsZU5hbWUgfSBmcm9tICcuL3NjaGVtYS9nZXRUYWJsZU5hbWUnXG5cbmV4cG9ydCBhc3luYyBmdW5jdGlvbiBmaW5kT25lPFQgZXh0ZW5kcyBUeXBlV2l0aElEPihcbiAgdGhpczogUG9zdGdyZXNBZGFwdGVyLFxuICB7IGNvbGxlY3Rpb24sIGxvY2FsZSwgcmVxID0ge30gYXMgUGF5bG9hZFJlcXVlc3QsIHdoZXJlIH06IEZpbmRPbmVBcmdzLFxuKTogUHJvbWlzZTxUPiB7XG4gIGNvbnN0IGNvbGxlY3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kFJQzs7Ozs7O0FBRWxCLGVBQWVBLFFBRXBCLEVBQUVDLFVBQVUsRUFBRUMsTUFBTSxFQUFFQyxNQUFNLENBQUMsQ0FBbUIsRUFBRUMsS0FBSyxFQUFlO0lBRXRFLE1BQU1DLG1CQUE4QyxJQUFJLENBQUNDLE9BQU8sQ0FBQ0MsV0FBVyxDQUFDTixXQUFXLENBQUNPLE1BQU07SUFFL0YsTUFBTUMsWUFBWSxJQUFJLENBQUNDLFlBQVksQ0FBQ0MsR0FBRyxDQUFDQyxJQUFBQSxvQkFBVyxFQUFDUCxpQkFBaUJRLElBQUk7SUFFekUsTUFBTSxFQUFFQyxJQUFJLEVBQUUsR0FBRyxNQUFNQyxJQUFBQSxrQkFBUSxFQUFDO1FBQzlCQyxTQUFTLElBQUk7UUFDYkMsUUFBUVosaUJBQWlCWSxNQUFNO1FBQy9CQyxPQUFPO1FBQ1BoQjtRQUNBaUIsTUFBTTtRQUNOQyxZQUFZO1FBQ1pqQjtRQUNBa0IsTUFBTUM7UUFDTmI7UUFDQUw7SUFDRjtJQUVBLE9BQU9VLE1BQU0sQ0FBQyxFQUFFLElBQUk7QUFDdEIifQ==
@@ -1 +1 @@
1
- {"version":3,"file":"findVersions.d.ts","sourceRoot":"","sources":["../src/findVersions.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAA;AAUpD,eAAO,MAAM,YAAY,EAAE,YAqC1B,CAAA"}
1
+ {"version":3,"file":"findVersions.d.ts","sourceRoot":"","sources":["../src/findVersions.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAA;AAUpD,eAAO,MAAM,YAAY,EAAE,YAoC1B,CAAA"}
@@ -9,16 +9,17 @@ Object.defineProperty(exports, "findVersions", {
9
9
  }
10
10
  });
11
11
  const _versions = require("payload/versions");
12
+ const _tosnakecase = /*#__PURE__*/ _interop_require_default(require("to-snake-case"));
12
13
  const _findMany = require("./find/findMany");
13
- const _getTableName = require("./schema/getTableName");
14
+ function _interop_require_default(obj) {
15
+ return obj && obj.__esModule ? obj : {
16
+ default: obj
17
+ };
18
+ }
14
19
  const findVersions = async function findVersions({ collection, limit, locale, page, pagination, req = {}, skip, sort: sortArg, where }) {
15
20
  const collectionConfig = this.payload.collections[collection].config;
16
21
  const sort = typeof sortArg === 'string' ? sortArg : collectionConfig.defaultSort;
17
- const tableName = (0, _getTableName.getTableName)({
18
- adapter: this,
19
- config: collectionConfig,
20
- versions: true
21
- });
22
+ const tableName = this.tableNameMap.get(`_${(0, _tosnakecase.default)(collectionConfig.slug)}${this.versionsSuffix}`);
22
23
  const fields = (0, _versions.buildVersionCollectionFields)(collectionConfig);
23
24
  return (0, _findMany.findMany)({
24
25
  adapter: this,
@@ -35,4 +36,4 @@ const findVersions = async function findVersions({ collection, limit, locale, pa
35
36
  });
36
37
  };
37
38
 
38
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uL3NyYy9maW5kVmVyc2lvbnMudHMiXSwic291cmNlc0NvbnRlbnQiOlsiaW1wb3J0IHR5cGUgeyBGaW5kVmVyc2lvbnMgfSBmcm9tICdwYXlsb2FkL2RhdGFiYXNlJ1xuaW1wb3J0IHR5cGUgeyBQYXlsb2FkUmVxdWVzdCwgU2FuaXRpemVkQ29sbGVjdGlvbkNvbmZpZyB9IGZyb20gJ3BheWxvYWQvdHlwZXMnXG5cbmltcG9ydCB7IGJ1aWxkVmVyc2lvbkNvbGxlY3Rpb25GaWVsZHMgfSBmcm9tICdwYXlsb2FkL3ZlcnNpb25zJ1xuXG5pbXBvcnQgdHlwZSB7IFBvc3RncmVzQWRhcHRlciB9IGZyb20gJy4vdHlwZXMnXG5cbmltcG9ydCB7IGZpbmRNYW55IH0gZnJvbSAnLi9maW5kL2ZpbmRNYW55J1xuaW1wb3J0IHsgZ2V0VGFibGVOYW1lIH0gZnJvbSAnLi9zY2hlbWE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AAE7D,wBAAgB,eAAe,CAAC,IAAI,EAAE,IAAI,GAAG,qBAAqB,CAqEjE"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,IAAI,EAAmB,qBAAqB,EAAE,MAAM,SAAS,CAAA;AAkC3E,YAAY,EAAE,eAAe,EAAE,aAAa,EAAE,MAAM,SAAS,CAAA;AAE7D,wBAAgB,eAAe,CAAC,IAAI,EAAE,IAAI,GAAG,qBAAqB,CAmEjE"}
package/dist/index.js CHANGED
@@ -48,17 +48,16 @@ function _interop_require_default(obj) {
48
48
  };
49
49
  }
50
50
  function postgresAdapter(args) {
51
+ const postgresIDType = args.idType || 'serial';
52
+ const payloadIDType = postgresIDType === 'serial' ? 'number' : 'text';
51
53
  function adapter({ payload }) {
52
54
  const migrationDir = findMigrationDir(args.migrationDir);
53
- const idType = args.idType || 'serial';
54
55
  return (0, _database.createDatabaseAdapter)({
55
56
  name: 'postgres',
56
- // Postgres-specific
57
- blockTableNames: {},
58
57
  drizzle: undefined,
59
58
  enums: {},
60
59
  fieldConstraints: {},
61
- idType,
60
+ idType: postgresIDType,
62
61
  localesSuffix: args.localesSuffix || '_locales',
63
62
  logger: args.logger,
64
63
  pgSchema: undefined,
@@ -70,6 +69,7 @@ function postgresAdapter(args) {
70
69
  schema: {},
71
70
  schemaName: args.schemaName,
72
71
  sessions: {},
72
+ tableNameMap: new Map(),
73
73
  tables: {},
74
74
  versionsSuffix: args.versionsSuffix || '_v',
75
75
  // DatabaseAdapter
@@ -82,9 +82,7 @@ function postgresAdapter(args) {
82
82
  createGlobalVersion: _createGlobalVersion.createGlobalVersion,
83
83
  createMigration: _createMigration.createMigration,
84
84
  createVersion: _createVersion.createVersion,
85
- /**
86
- * This represents how a default ID is treated in Payload as were a field type
87
- */ defaultIDType: idType === 'serial' ? 'number' : 'text',
85
+ defaultIDType: payloadIDType,
88
86
  deleteMany: _deleteMany.deleteMany,
89
87
  deleteOne: _deleteOne.deleteOne,
90
88
  deleteVersions: _deleteVersions.deleteVersions,
@@ -146,4 +144,4 @@ function postgresAdapter(args) {
146
144
  return srcDir;
147
145
  }
148
146
 
149
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uL3NyYy9pbmRleC50cyJdLCJzb3VyY2VzQ29udGVudCI6WyJpbXBvcnQgdHlwZSB7IFBheWxvYWQgfSBmcm9tICdwYXlsb2FkJ1xuXG5pbXBvcnQgZnMgZnJvbSAnZnMnXG5pbXBvcnQgcGF0aCBmcm9tICdwYXRoJ1xuaW1wb3J0IHsgY3JlYXRlRGF0YWJhc2VBZGFwdGVyIH0gZnJvbSAncGF5bG9hZC9kYXRhYmFzZSdcblxuaW1wb3J0IHR5cGUgeyBBcmdzLCBQb3N0Z3Jlc0FkYXB0ZXIsIFBvc3RncmVzQWRhcHRlclJlc3VsdCB9IGZyb20gJy4vdHlwZXMnXG5cbmltcG9ydCB7IGNvbm5lY3QgfSBmcm9tICcuL2Nvbm5lY3QnXG5pbXBvcnQgeyBjb3VudCB9IGZyb20gJy4vY291bnQnXG5pbXBvcnQgeyBjcmVhdGUgfSBmcm9tICcuL2NyZWF0ZSdcbmltcG9ydCB7IGNyZWF0ZUdsb2JhbCB9IGZyb20gJy4vY3JlYXRlR2xvYmFsJ1xuaW1wb3J0IHsgY3JlYXRlR2xvYmFsVmVyc2lvbiB9IGZyb20gJy4vY3JlYXRlR2xvYmFsVmVyc2lvbidcbmltcG9ydCB7IGNyZWF0ZU1pZ3JhdGlvbiB9IGZyb20gJy4vY3JlYXRlTWlncmF0aW9uJ1xuaW1wb3J0IHsgY3JlYXRlVmVyc2lvbiB9IGZyb20gJy4vY3JlYXRlVmVyc2lvbidcbmltcG9ydCB7IGRlbGV0ZU1hbnkgfSBmcm9tICcuL2RlbGV0ZU1hbnknXG5pbXBvcnQgeyBkZWxldGVPbmUgfSBmcm9tICcuL2RlbGV0ZU9uZ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ozs7Ozs7Q0FhQyxHQUNELFNBQVNHLGlCQUFpQkQsWUFBcUI7SUFDN0MsTUFBTXVELE1BQU1DLFFBQVFELEdBQUc7SUFDdkIsTUFBTUUsU0FBU0MsYUFBSSxDQUFDQyxPQUFPLENBQUNKLEtBQUs7SUFDakMsTUFBTUssVUFBVUYsYUFBSSxDQUFDQyxPQUFPLENBQUNKLEtBQUs7SUFDbEMsTUFBTU0scUJBQXFCSCxhQUFJLENBQUNDLE9BQU8sQ0FBQ0osS0FBSztJQUU3QyxzQkFBc0I7SUFDdEIsSUFBSXZELGNBQWMsT0FBT0E7SUFFekIsK0JBQStCO0lBQy9CLElBQUk4RCxXQUFFLENBQUNDLFVBQVUsQ0FBQ04sU0FBUztRQUN6QixPQUFPQTtJQUNUO0lBRUEsSUFBSUssV0FBRSxDQUFDQyxVQUFVLENBQUNILFVBQVU7UUFDMUIsT0FBT0E7SUFDVDtJQUVBLElBQUlFLFdBQUUsQ0FBQ0MsVUFBVSxDQUFDRixxQkFBcUI7UUFDckMsT0FBT0E7SUFDVDtJQUVBLE9BQU9KO0FBQ1QifQ==
@@ -1 +1 @@
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,IA0FlB,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,IAgGlB,CAAA"}
package/dist/init.js CHANGED
@@ -11,7 +11,7 @@ Object.defineProperty(exports, "init", {
11
11
  const _pgcore = require("drizzle-orm/pg-core");
12
12
  const _versions = require("payload/versions");
13
13
  const _build = require("./schema/build");
14
- const _getTableName = require("./schema/getTableName");
14
+ const _createTableName = require("./schema/createTableName");
15
15
  const init = async function init() {
16
16
  if (this.schemaName) {
17
17
  this.pgSchema = (0, _pgcore.pgSchema)(this.schemaName);
@@ -24,7 +24,7 @@ const init = async function init() {
24
24
  this.enums.enum__locales = (0, _pgcore.pgEnum)('_locales', this.payload.config.localization.locales.map(({ code })=>code));
25
25
  }
26
26
  this.payload.config.collections.forEach((collection)=>{
27
- const tableName = (0, _getTableName.getTableName)({
27
+ const tableName = (0, _createTableName.createTableName)({
28
28
  adapter: this,
29
29
  config: collection
30
30
  });
@@ -41,10 +41,11 @@ const init = async function init() {
41
41
  versions: false
42
42
  });
43
43
  if (collection.versions) {
44
- const versionsTableName = (0, _getTableName.getTableName)({
44
+ const versionsTableName = (0, _createTableName.createTableName)({
45
45
  adapter: this,
46
46
  config: collection,
47
- versions: true
47
+ versions: true,
48
+ versionsCustomName: true
48
49
  });
49
50
  const versionFields = (0, _versions.buildVersionCollectionFields)(collection);
50
51
  (0, _build.buildTable)({
@@ -62,7 +63,7 @@ const init = async function init() {
62
63
  }
63
64
  });
64
65
  this.payload.config.globals.forEach((global)=>{
65
- const tableName = (0, _getTableName.getTableName)({
66
+ const tableName = (0, _createTableName.createTableName)({
66
67
  adapter: this,
67
68
  config: global
68
69
  });
@@ -79,10 +80,11 @@ const init = async function init() {
79
80
  versions: false
80
81
  });
81
82
  if (global.versions) {
82
- const versionsTableName = (0, _getTableName.getTableName)({
83
+ const versionsTableName = (0, _createTableName.createTableName)({
83
84
  adapter: this,
84
85
  config: global,
85
- versions: true
86
+ versions: true,
87
+ versionsCustomName: true
86
88
  });
87
89
  const versionFields = (0, _versions.buildVersionGlobalFields)(global);
88
90
  (0, _build.buildTable)({
@@ -101,4 +103,4 @@ const init = async function init() {
101
103
  });
102
104
  };
103
105
 
104
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uL3NyYy9pbml0LnRzIl0sInNvdXJjZXNDb250ZW50IjpbIi8qIGVzbGludC1kaXNhYmxlIG5vLX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