@payloadcms/db-postgres 0.4.0 → 0.5.1
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/createMigration.js +3 -3
- package/dist/find/findMany.js +2 -2
- package/dist/migrateDown.js +4 -2
- package/dist/migrateFresh.d.ts +3 -1
- package/dist/migrateFresh.d.ts.map +1 -1
- package/dist/migrateFresh.js +14 -12
- package/dist/queries/getTableColumnFromPath.d.ts.map +1 -1
- package/dist/queries/getTableColumnFromPath.js +5 -10
- package/dist/queries/parseParams.d.ts.map +1 -1
- package/dist/queries/parseParams.js +9 -1
- package/dist/schema/build.d.ts +3 -3
- package/dist/schema/build.d.ts.map +1 -1
- package/dist/schema/build.js +17 -17
- package/dist/schema/createIndex.d.ts +2 -1
- package/dist/schema/createIndex.d.ts.map +1 -1
- package/dist/schema/createIndex.js +4 -4
- package/dist/schema/traverseFields.d.ts +4 -4
- package/dist/schema/traverseFields.d.ts.map +1 -1
- package/dist/schema/traverseFields.js +29 -28
- package/dist/types.d.ts +11 -8
- package/dist/types.d.ts.map +1 -1
- package/package.json +4 -4
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"build.d.ts","sourceRoot":"","sources":["../../src/schema/build.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,YAAY,EAAE,eAAe,EAAE,uBAAuB,EAAE,MAAM,qBAAqB,CAAA;AACjG,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,eAAe,CAAA;AAgB1C,OAAO,KAAK,EAAE,cAAc,EAAgB,eAAe,EAAE,MAAM,UAAU,CAAA;AAM7E,KAAK,IAAI,GAAG;IACV,OAAO,EAAE,eAAe,CAAA;IACxB,WAAW,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,eAAe,CAAC,CAAA;IAC7C,eAAe,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,CAAC,IAAI,EAAE,cAAc,KAAK,YAAY,GAAG,uBAAuB,CAAC,CAAA;IAClG,
|
1
|
+
{"version":3,"file":"build.d.ts","sourceRoot":"","sources":["../../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7 +20,7 @@ function _interop_require_default(obj) {
|
|
20
20
|
default: obj
|
21
21
|
};
|
22
22
|
}
|
23
|
-
const buildTable = ({ adapter, baseColumns = {}, baseExtraConfig = {},
|
23
|
+
const buildTable = ({ adapter, baseColumns = {}, baseExtraConfig = {}, buildNumbers, buildRelationships, buildTexts, disableNotNull, disableUnique = false, fields, rootRelationsToBuild, rootRelationships, rootTableIDColType, rootTableName: incomingRootTableName, tableName, timestamps })=>{
|
24
24
|
const rootTableName = incomingRootTableName || tableName;
|
25
25
|
const columns = baseColumns;
|
26
26
|
const indexes = {};
|
@@ -47,11 +47,11 @@ const buildTable = ({ adapter, baseColumns = {}, baseExtraConfig = {}, buildText
|
|
47
47
|
varchar: _pgcore.varchar
|
48
48
|
};
|
49
49
|
columns.id = idColTypeMap[idColType]('id').primaryKey();
|
50
|
-
({ hasLocalizedField,
|
50
|
+
({ hasLocalizedField, hasLocalizedManyNumberField, hasLocalizedManyTextField, hasLocalizedRelationshipField, hasManyNumberField, hasManyTextField } = (0, _traverseFields.traverseFields)({
|
51
51
|
adapter,
|
52
|
-
buildTexts,
|
53
52
|
buildNumbers,
|
54
53
|
buildRelationships,
|
54
|
+
buildTexts,
|
55
55
|
columns,
|
56
56
|
disableNotNull,
|
57
57
|
disableUnique,
|
@@ -122,25 +122,25 @@ const buildTable = ({ adapter, baseColumns = {}, baseExtraConfig = {}, buildText
|
|
122
122
|
const textsTableName = `${rootTableName}_texts`;
|
123
123
|
const columns = {
|
124
124
|
id: (0, _pgcore.serial)('id').primaryKey(),
|
125
|
-
text: (0, _pgcore.varchar)('text'),
|
126
125
|
order: (0, _pgcore.integer)('order').notNull(),
|
127
126
|
parent: _parentIDColumnMap.parentIDColumnMap[idColType]('parent_id').references(()=>table.id, {
|
128
127
|
onDelete: 'cascade'
|
129
128
|
}).notNull(),
|
130
|
-
path: (0, _pgcore.varchar)('path').notNull()
|
129
|
+
path: (0, _pgcore.varchar)('path').notNull(),
|
130
|
+
text: (0, _pgcore.varchar)('text')
|
131
131
|
};
|
132
132
|
if (hasLocalizedManyTextField) {
|
133
133
|
columns.locale = adapter.enums.enum__locales('locale');
|
134
134
|
}
|
135
135
|
textsTable = (0, _pgcore.pgTable)(textsTableName, columns, (cols)=>{
|
136
136
|
const indexes = {
|
137
|
-
orderParentIdx: (0, _pgcore.index)(
|
137
|
+
orderParentIdx: (0, _pgcore.index)(`${textsTableName}_order_parent_idx`).on(cols.order, cols.parent)
|
138
138
|
};
|
139
139
|
if (hasManyTextField === 'index') {
|
140
|
-
indexes.text_idx = (0, _pgcore.index)(
|
140
|
+
indexes.text_idx = (0, _pgcore.index)(`${textsTableName}_text_idx`).on(cols.text);
|
141
141
|
}
|
142
142
|
if (hasLocalizedManyTextField) {
|
143
|
-
indexes.localeParent = (0, _pgcore.index)(
|
143
|
+
indexes.localeParent = (0, _pgcore.index)(`${textsTableName}_locale_parent`).on(cols.locale, cols.parent);
|
144
144
|
}
|
145
145
|
return indexes;
|
146
146
|
});
|
@@ -173,13 +173,13 @@ const buildTable = ({ adapter, baseColumns = {}, baseExtraConfig = {}, buildText
|
|
173
173
|
}
|
174
174
|
numbersTable = (0, _pgcore.pgTable)(numbersTableName, columns, (cols)=>{
|
175
175
|
const indexes = {
|
176
|
-
orderParentIdx: (0, _pgcore.index)(
|
176
|
+
orderParentIdx: (0, _pgcore.index)(`${numbersTableName}_order_parent_idx`).on(cols.order, cols.parent)
|
177
177
|
};
|
178
178
|
if (hasManyNumberField === 'index') {
|
179
|
-
indexes.numberIdx = (0, _pgcore.index)(
|
179
|
+
indexes.numberIdx = (0, _pgcore.index)(`${numbersTableName}_number_idx`).on(cols.number);
|
180
180
|
}
|
181
181
|
if (hasLocalizedManyNumberField) {
|
182
|
-
indexes.localeParent = (0, _pgcore.index)(
|
182
|
+
indexes.localeParent = (0, _pgcore.index)(`${numbersTableName}_locale_parent`).on(cols.locale, cols.parent);
|
183
183
|
}
|
184
184
|
return indexes;
|
185
185
|
});
|
@@ -222,12 +222,12 @@ const buildTable = ({ adapter, baseColumns = {}, baseExtraConfig = {}, buildText
|
|
222
222
|
const relationshipsTableName = `${tableName}_rels`;
|
223
223
|
relationshipsTable = (0, _pgcore.pgTable)(relationshipsTableName, relationshipColumns, (cols)=>{
|
224
224
|
const result = {
|
225
|
-
order: (0, _pgcore.index)(
|
226
|
-
parentIdx: (0, _pgcore.index)(
|
227
|
-
pathIdx: (0, _pgcore.index)(
|
225
|
+
order: (0, _pgcore.index)(`${relationshipsTableName}_order_idx`).on(cols.order),
|
226
|
+
parentIdx: (0, _pgcore.index)(`${relationshipsTableName}_parent_idx`).on(cols.parent),
|
227
|
+
pathIdx: (0, _pgcore.index)(`${relationshipsTableName}_path_idx`).on(cols.path)
|
228
228
|
};
|
229
229
|
if (hasLocalizedRelationshipField) {
|
230
|
-
result.localeIdx = (0, _pgcore.index)(
|
230
|
+
result.localeIdx = (0, _pgcore.index)(`${relationshipsTableName}_locale_idx`).on(cols.locale);
|
231
231
|
}
|
232
232
|
return result;
|
233
233
|
});
|
@@ -284,10 +284,10 @@ const buildTable = ({ adapter, baseColumns = {}, baseExtraConfig = {}, buildText
|
|
284
284
|
});
|
285
285
|
adapter.relations[`relations_${tableName}`] = tableRelations;
|
286
286
|
return {
|
287
|
-
hasManyTextField,
|
288
287
|
hasManyNumberField,
|
288
|
+
hasManyTextField,
|
289
289
|
relationsToBuild
|
290
290
|
};
|
291
291
|
};
|
292
292
|
|
293
|
-
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9zY2hlbWEvYnVpbGQudHMiXSwic291cmNlc0NvbnRlbnQiOlsiLyogZXNsaW50LWRpc2FibGUgbm8tcGFyYW0tcmVhc3NpZ24gKi9cbmltcG9ydCB0eXBlIHsgUmVsYXRpb24gfSBmcm9tICdkcml6emxlLW9ybSdcbmltcG9ydCB0eXBlIHsgSW5kZXhCdWlsZGVyLCBQZ0NvbHVtbkJ1aWxkZXIsIFVu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AgICAgICAgcmVzdWx0LmxvY2FsZUlkeCA9IGluZGV4KCdsb2NhbGVfaWR4Jykub24oY29scy5sb2NhbGUpXG4gICAgICAgIH1cblxuICAgICAgICByZXR1cm4gcmVzdWx0XG4gICAgICB9KVxuXG4gICAgICBhZGFwdGVyLnRhYmxlc1tyZWxhdGlvbnNoaXBzVGFibGVOYW1lXSA9IHJlbGF0aW9uc2hpcHNUYWJsZVxuXG4gICAgICBjb25zdCByZWxhdGlvbnNoaXBzVGFibGVSZWxhdGlvbnMgPSByZWxhdGlvbnMocmVsYXRpb25zaGlwc1RhYmxlLCAoeyBvbmUgfSkgPT4ge1xuICAgICAgICBjb25zdCByZXN1bHQ6IFJlY29yZDxzdHJpbmcsIFJlbGF0aW9uPHN0cmluZz4+ID0ge1xuICAgICAgICAgIHBhcmVudDogb25lKHRhYmxlLCB7XG4gICAgICAgICAgICBmaWVsZHM6IFtyZWxhdGlvbnNoaXBzVGFibGUucGFyZW50XSxcbiAgICAgICAgICAgIHJlZmVyZW5jZXM6IFt0YWJsZS5pZF0sXG4gICAgICAgICAgICByZWxhdGlvbk5hbWU6ICdfcmVscycsXG4gICAgICAgICAgfSksXG4gICAgICAgIH1cblxuICAgICAgICByZWxhdGlvbnNoaXBzLmZvckVhY2goKHJlbGF0aW9uVG8pID0+IHtcbiAgICAgICAgICBjb25zdCByZWxhdGVkVGFibGVOYW1lID0gdG9TbmFrZUNhc2UocmVsYXRpb25UbylcbiAgICAgICAgICBjb25zdCBpZENvbHVtbk5hbWUgPSBgJHtyZWxhdGlvblRvfUlEYFxuICAgICAgICAgIHJlc3VsdFtpZENvbHVtbk5hbWVdID0gb25lKGFkYXB0ZXIudGFibGVzW3JlbGF0ZWRUYWJsZU5hbWVdLCB7XG4gICAgICAgICAgICBmaWVsZHM6IFtyZWxhdGlvbnNoaXBzVGFibGVbaWRDb2x1bW5OYW1lXV0sXG4gICAgICAgICAgICByZWZlcmVuY2VzOiBbYWRhcHRlci50YWJsZXNbcmVsYX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DVDtJQUVBaEgsUUFBUStFLFNBQVMsQ0FBQyxDQUFDLFVBQVUsRUFBRWpFLFVBQVUsQ0FBQyxDQUFDLEdBQUcwRztJQUU5QyxPQUFPO1FBQUVuRztRQUFvQkQ7UUFBa0JZO0lBQWlCO0FBQ2xFIn0=
|
@@ -2,9 +2,10 @@ import type { GenericColumn } from '../types';
|
|
2
2
|
type CreateIndexArgs = {
|
3
3
|
columnName: string;
|
4
4
|
name: string | string[];
|
5
|
+
tableName: string;
|
5
6
|
unique?: boolean;
|
6
7
|
};
|
7
|
-
export declare const createIndex: ({ name, columnName, unique }: CreateIndexArgs) => (table: {
|
8
|
+
export declare const createIndex: ({ name, columnName, tableName, unique }: CreateIndexArgs) => (table: {
|
8
9
|
[x: string]: GenericColumn;
|
9
10
|
}) => import("drizzle-orm/pg-core").IndexBuilder;
|
10
11
|
export {};
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"createIndex.d.ts","sourceRoot":"","sources":["../../src/schema/createIndex.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,UAAU,CAAA;AAE7C,KAAK,eAAe,GAAG;IACrB,UAAU,EAAE,MAAM,CAAA;IAClB,IAAI,EAAE,MAAM,GAAG,MAAM,EAAE,CAAA;IACvB,MAAM,CAAC,EAAE,OAAO,CAAA;CACjB,CAAA;AAED,eAAO,MAAM,WAAW,
|
1
|
+
{"version":3,"file":"createIndex.d.ts","sourceRoot":"","sources":["../../src/schema/createIndex.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,UAAU,CAAA;AAE7C,KAAK,eAAe,GAAG;IACrB,UAAU,EAAE,MAAM,CAAA;IAClB,IAAI,EAAE,MAAM,GAAG,MAAM,EAAE,CAAA;IACvB,SAAS,EAAE,MAAM,CAAA;IACjB,MAAM,CAAC,EAAE,OAAO,CAAA;CACjB,CAAA;AAED,eAAO,MAAM,WAAW,4CAA6C,eAAe;;gDAenF,CAAA"}
|
@@ -9,7 +9,7 @@ Object.defineProperty(exports, "createIndex", {
|
|
9
9
|
}
|
10
10
|
});
|
11
11
|
const _pgcore = require("drizzle-orm/pg-core");
|
12
|
-
const createIndex = ({ name, columnName, unique })=>{
|
12
|
+
const createIndex = ({ name, columnName, tableName, unique })=>{
|
13
13
|
return (table)=>{
|
14
14
|
let columns;
|
15
15
|
if (Array.isArray(name)) {
|
@@ -20,9 +20,9 @@ const createIndex = ({ name, columnName, unique })=>{
|
|
20
20
|
table[name]
|
21
21
|
];
|
22
22
|
}
|
23
|
-
if (unique) return (0, _pgcore.uniqueIndex)(`${columnName}_idx`).on(columns[0], ...columns.slice(1));
|
24
|
-
return (0, _pgcore.index)(`${columnName}_idx`).on(columns[0], ...columns.slice(1));
|
23
|
+
if (unique) return (0, _pgcore.uniqueIndex)(`${tableName}_${columnName}_idx`).on(columns[0], ...columns.slice(1));
|
24
|
+
return (0, _pgcore.index)(`${tableName}_${columnName}_idx`).on(columns[0], ...columns.slice(1));
|
25
25
|
};
|
26
26
|
};
|
27
27
|
|
28
|
-
//# sourceMappingURL=data:application/json;base64,
|
28
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9zY2hlbWEvY3JlYXRlSW5kZXgudHMiXSwic291cmNlc0NvbnRlbnQiOlsiLyogZXNsaW50LWRpc2FibGUgbm8tcGFyYW0tcmVhc3NpZ24gKi9cbmltcG9ydCB7IGluZGV4LCB1bmlxdWVJbmRleCB9IGZyb20gJ2RyaXp6bGUtb3JtL3BnLWNvcmUnXG5cbmltcG9ydCB0eXBlIHsgR2VuZXJpY0NvbHVtbiB9IGZyb20gJy4uL3R5cGVzJ1xuXG50eXBlIENyZWF0ZUluZGV4QXJncyA9IHtcbiAgY29sdW1uTmFtZTogc3RyaW5nXG4gIG5hbWU6IHN0cmluZyB8IHN0cmluZ1tdXG4gIHRhYmxlTmFtZTogc3RyaW5nXG4gIHV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Y29sIiwidW5pcXVlSW5kZXgiLCJvbiIsInNsaWNlIiwiaW5kZXgiXSwibWFwcGluZ3MiOiJBQUFBLG9DQUFvQzs7OzsrQkFZdkJBOzs7ZUFBQUE7Ozt3QkFYc0I7QUFXNUIsTUFBTUEsY0FBYyxDQUFDLEVBQUVDLElBQUksRUFBRUMsVUFBVSxFQUFFQyxTQUFTLEVBQUVDLE1BQU0sRUFBbUI7SUFDbEYsT0FBTyxDQUFDQztRQUNOLElBQUlDO1FBQ0osSUFBSUMsTUFBTUMsT0FBTyxDQUFDUCxPQUFPO1lBQ3ZCSyxVQUFVTCxLQUNQUSxHQUFHLENBQUMsQ0FBQ1AsYUFBZUcsS0FBSyxDQUFDSCxXQUFXLENBQ3RDLGlGQUFpRjthQUNoRlEsTUFBTSxDQUFDLENBQUNDLE1BQVEsT0FBT0EsUUFBUTtRQUNwQyxPQUFPO1lBQ0xMLFVBQVU7Z0JBQUNELEtBQUssQ0FBQ0osS0FBSzthQUFDO1FBQ3pCO1FBQ0EsSUFBSUcsUUFDRixPQUFPUSxJQUFBQSxtQkFBVyxFQUFDLENBQUMsRUFBRVQsVUFBVSxDQUFDLEVBQUVELFdBQVcsSUFBSSxDQUFDLEVBQUVXLEVBQUUsQ0FBQ1AsT0FBTyxDQUFDLEVBQUUsS0FBS0EsUUFBUVEsS0FBSyxDQUFDO1FBQ3ZGLE9BQU9DLElBQUFBLGFBQUssRUFBQyxDQUFDLEVBQUVaLFVBQVUsQ0FBQyxFQUFFRCxXQUFXLElBQUksQ0FBQyxFQUFFVyxFQUFFLENBQUNQLE9BQU8sQ0FBQyxFQUFFLEtBQUtBLFFBQVFRLEtBQUssQ0FBQztJQUNqRjtBQUNGIn0=
|
@@ -3,9 +3,9 @@ import type { Field, TabAsField } from 'payload/types';
|
|
3
3
|
import type { GenericColumns, PostgresAdapter } from '../types';
|
4
4
|
type Args = {
|
5
5
|
adapter: PostgresAdapter;
|
6
|
-
buildTexts: boolean;
|
7
6
|
buildNumbers: boolean;
|
8
7
|
buildRelationships: boolean;
|
8
|
+
buildTexts: boolean;
|
9
9
|
columnPrefix?: string;
|
10
10
|
columns: Record<string, PgColumnBuilder>;
|
11
11
|
disableNotNull: boolean;
|
@@ -26,12 +26,12 @@ type Args = {
|
|
26
26
|
};
|
27
27
|
type Result = {
|
28
28
|
hasLocalizedField: boolean;
|
29
|
-
hasLocalizedManyTextField: boolean;
|
30
29
|
hasLocalizedManyNumberField: boolean;
|
30
|
+
hasLocalizedManyTextField: boolean;
|
31
31
|
hasLocalizedRelationshipField: boolean;
|
32
|
-
hasManyTextField: 'index' | boolean;
|
33
32
|
hasManyNumberField: 'index' | boolean;
|
33
|
+
hasManyTextField: 'index' | boolean;
|
34
34
|
};
|
35
|
-
export declare const traverseFields: ({ adapter,
|
35
|
+
export declare const traverseFields: ({ adapter, buildNumbers, buildRelationships, buildTexts, columnPrefix, columns, disableNotNull, disableUnique, fieldPrefix, fields, forceLocalized, indexes, localesColumns, localesIndexes, newTableName, parentTableName, relationsToBuild, relationships, rootRelationsToBuild, rootTableIDColType, rootTableName, }: Args) => Result;
|
36
36
|
export {};
|
37
37
|
//# sourceMappingURL=traverseFields.d.ts.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"traverseFields.d.ts","sourceRoot":"","sources":["../../src/schema/traverseFields.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,YAAY,EAAE,eAAe,EAA2B,MAAM,qBAAqB,CAAA;AACjG,OAAO,KAAK,EAAE,KAAK,EAAE,UAAU,EAAE,MAAM,eAAe,CAAA;AAoBtD,OAAO,KAAK,EAAE,cAAc,EAAE,eAAe,EAAE,MAAM,UAAU,CAAA;AAS/D,KAAK,IAAI,GAAG;IACV,OAAO,EAAE,eAAe,CAAA;IACxB,
|
1
|
+
{"version":3,"file":"traverseFields.d.ts","sourceRoot":"","sources":["../../src/schema/traverseFields.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,YAAY,EAAE,eAAe,EA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