@payloadcms/db-postgres 0.8.5 → 0.8.7
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/count.js +2 -2
- package/dist/create.js +2 -2
- package/dist/createGlobal.js +2 -2
- package/dist/createGlobalVersion.js +2 -2
- package/dist/createVersion.js +2 -2
- package/dist/deleteMany.js +2 -2
- package/dist/deleteOne.js +2 -2
- package/dist/deleteVersions.js +2 -2
- package/dist/find/buildFindManyArgs.d.ts.map +1 -1
- package/dist/find/buildFindManyArgs.js +2 -1
- package/dist/find/findMany.js +2 -2
- package/dist/find/traverseFields.d.ts +2 -1
- package/dist/find/traverseFields.d.ts.map +1 -1
- package/dist/find/traverseFields.js +9 -3
- package/dist/migrate.js +2 -1
- package/dist/migrateFresh.d.ts.map +1 -1
- package/dist/migrateFresh.js +2 -1
- package/dist/migrateRefresh.d.ts.map +1 -1
- package/dist/migrateRefresh.js +2 -1
- package/dist/queries/getTableColumnFromPath.d.ts.map +1 -1
- package/dist/queries/getTableColumnFromPath.js +7 -6
- package/dist/transactions/commitTransaction.d.ts.map +1 -1
- package/dist/transactions/commitTransaction.js +2 -1
- package/dist/transactions/rollbackTransaction.d.ts.map +1 -1
- package/dist/transactions/rollbackTransaction.js +6 -5
- package/dist/update.js +2 -2
- package/dist/updateGlobal.js +2 -2
- package/dist/updateGlobalVersion.js +2 -2
- package/dist/updateVersion.js +2 -2
- package/dist/upsertRow/insertArrays.d.ts.map +1 -1
- package/dist/upsertRow/insertArrays.js +5 -2
- package/dist/utilities/hasLocalesTable.d.ts.map +1 -1
- package/dist/utilities/hasLocalesTable.js +4 -2
- package/package.json +3 -3
@@ -11,11 +11,13 @@ Object.defineProperty(exports, "hasLocalesTable", {
|
|
11
11
|
const _types = require("payload/types");
|
12
12
|
const hasLocalesTable = (fields)=>{
|
13
13
|
return fields.some((field)=>{
|
14
|
+
// arrays always get a separate table
|
15
|
+
if (field.type === 'array') return false;
|
14
16
|
if ((0, _types.fieldAffectsData)(field) && field.localized) return true;
|
15
|
-
if ((0, _types.fieldHasSubFields)(field)
|
17
|
+
if ((0, _types.fieldHasSubFields)(field)) return hasLocalesTable(field.fields);
|
16
18
|
if (field.type === 'tabs') return field.tabs.some((tab)=>hasLocalesTable(tab.fields));
|
17
19
|
return false;
|
18
20
|
});
|
19
21
|
};
|
20
22
|
|
21
|
-
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy91dGlsaXRpZXMvaGFzTG9jYWxlc1RhYmxlLnRzIl0sInNvdXJjZXNDb250ZW50IjpbImltcG9ydCB0eXBlIHsgRmllbGQgfSBmcm9tICdwYXlsb2FkL3R5cGVzJ1xuXG5pbXBvcnQgeyBmaWVsZEFmZmVjdHNEYXRhLCBmaWVsZEhhc1N1YkZpZWxkcyB9IGZyb20gJ3BheWxvYWQvdHlwZXMnXG5cbmV4cG9ydCBjb25zdCBoYXNMb2NhbGVzVGFibGUgPSAoZmllbGRzOiBGaWVsZFtdKTogYm9vbGVhbiA9PiB7XG4gIHJldHVybiBmaWVsZHMuc29tZSgoZmllbGQpID0+
|
23
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy91dGlsaXRpZXMvaGFzTG9jYWxlc1RhYmxlLnRzIl0sInNvdXJjZXNDb250ZW50IjpbImltcG9ydCB0eXBlIHsgRmllbGQgfSBmcm9tICdwYXlsb2FkL3R5cGVzJ1xuXG5pbXBvcnQgeyBmaWVsZEFmZmVjdHNEYXRhLCBmaWVsZEhhc1N1YkZpZWxkcyB9IGZyb20gJ3BheWxvYWQvdHlwZXMnXG5cbmV4cG9ydCBjb25zdCBoYXNMb2NhbGVzVGFibGUgPSAoZmllbGRzOiBGaWVsZFtdKTogYm9vbGVhbiA9PiB7XG4gIHJldHVybiBmaWVsZHMuc29tZSgoZmllbGQpID0+IHtcbiAgICAvLyBhcnJheXMgYWx3YXlzIGdldCBhIHNlcGFyYXRlIHRhYmxl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Q0FBQ04sSUFBSSxDQUFDLENBQUNPLE1BQVFULGdCQUFnQlMsSUFBSVIsTUFBTTtRQUNyRixPQUFPO0lBQ1Q7QUFDRiJ9
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@payloadcms/db-postgres",
|
3
|
-
"version": "0.8.
|
3
|
+
"version": "0.8.7",
|
4
4
|
"description": "The officially supported Postgres database adapter for Payload",
|
5
5
|
"repository": {
|
6
6
|
"type": "git",
|
@@ -29,8 +29,8 @@
|
|
29
29
|
"devDependencies": {
|
30
30
|
"@types/pg": "8.10.2",
|
31
31
|
"@types/to-snake-case": "1.0.0",
|
32
|
-
"
|
33
|
-
"
|
32
|
+
"@payloadcms/eslint-config": "1.1.1",
|
33
|
+
"payload": "2.29.0"
|
34
34
|
},
|
35
35
|
"peerDependencies": {
|
36
36
|
"payload": "^2.0.0"
|