@payloadcms/db-postgres 0.1.0-beta.10 → 0.1.0-beta.11
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/connect.d.ts.map +1 -1
- package/dist/connect.js +14 -1
- package/dist/createMigration.d.ts.map +1 -1
- package/dist/createMigration.js +12 -15
- package/dist/migrate.js +2 -2
- package/package.json +3 -3
package/dist/connect.d.ts.map
CHANGED
@@ -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;
|
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,OA4FrB,CAAA"}
|
package/dist/connect.js
CHANGED
@@ -11,6 +11,7 @@ Object.defineProperty(exports, "connect", {
|
|
11
11
|
const _utils = require("drizzle-kit/utils");
|
12
12
|
const _drizzleorm = require("drizzle-orm");
|
13
13
|
const _nodepostgres = require("drizzle-orm/node-postgres");
|
14
|
+
const _pgcore = require("drizzle-orm/pg-core");
|
14
15
|
const _pg = require("pg");
|
15
16
|
const _prompts = /*#__PURE__*/ _interop_require_default(require("prompts"));
|
16
17
|
function _interop_require_default(obj) {
|
@@ -77,6 +78,18 @@ const connect = async function connect(payload) {
|
|
77
78
|
}
|
78
79
|
}
|
79
80
|
await apply();
|
81
|
+
// Migration table def in order to use query using drizzle
|
82
|
+
const migrationsSchema = (0, _pgcore.pgTable)('payload_migrations', {
|
83
|
+
name: (0, _pgcore.varchar)('name'),
|
84
|
+
batch: (0, _pgcore.numeric)('batch')
|
85
|
+
});
|
86
|
+
const devPush = await this.drizzle.select().from(migrationsSchema).where((0, _drizzleorm.eq)(migrationsSchema.batch, '-1'));
|
87
|
+
if (!devPush.length) {
|
88
|
+
await this.drizzle.insert(migrationsSchema).values({
|
89
|
+
name: 'dev',
|
90
|
+
batch: '-1'
|
91
|
+
});
|
92
|
+
}
|
80
93
|
};
|
81
94
|
|
82
|
-
//# sourceMappingURL=data:application/json;base64,
|
95
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uL3NyYy9jb25uZWN0LnRzIl0sInNvdXJjZXNDb250ZW50IjpbImltcG9ydCB0eXBlIHsgQ29ubmVjdCB9IGZyb20gJ3BheWxvYWQvZGF0YWJhc2UnXG5cbmltcG9ydCB7IHB1c2hTY2hlbWEgfSBmcm9tICdkcml6emxlLWtpdC91dGlscydcbmltcG9ydCB7IGVxLCBzcWwgfSBmcm9tICdkcml6emxlLW9ybSdcbmltcG9ydCB7IGRyaXp6bGUgfSBmcm9tICdkcml6emxlLW9ybS9ub2RlLXBvc3RncmVzJ1xuaW1wb3J0IHsganNvbmIsIG51bWVyaWMsIHBnVGFibGUsIHZhcmNoYXIgfSBmcm9tICdkcml6emxlLW9ybS9wZy1jb3JlJ1xuaW1wb3J0IHsgUG9vbCB9IGZyb20gJ3BnJ1xuaW1wb3J0IHByb21wdHMgZnJvbSAncHJvbXB0cydcblxuaW1wb3J0IHR5cGUgeyBQb3N0Z3Jlc0FkYXB0ZXIgfSBmcm9tICcuL3R5cGVzJ1xuXG5leHBvcnQgY29uc3QgY29ubmVjdDogQ29ubmVjdCA9IGFzeW5jIGZ1bmN0aW9uIGNvbm5lY3QodGhpczogUG9zdGdyZXNBZGFwdGVyLCBwYXlsb2FkKSB7XG4gIHRoaXMuc2NoZW1hID0ge1xuICAgIC4uLnRoaXMudGFibGVzLFxuICAgIC4uLnRoaXMucmVsYXRpb25zLFxuICAgIC4uLnRoaXMuZW51bXMsXG4gIH1cblxuICB0cnkge1xuICAgIHRoaXMucG9vbCA9IG5ldyBQb29sKHRoaXMuY2xpZW50KVxuICAgIGF3YWl0IHRoaXMucG9vbC5jb25uZWN0KClcblxuICAgIHRoaXMuZHJpen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Q0FBQ1Ysa0JBQWtCVyxNQUFNLENBQUM7WUFDakRmLE1BQU07WUFDTk8sT0FBTztRQUNUO0lBQ0Y7QUFDRiJ9
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"createMigration.d.ts","sourceRoot":"","sources":["../src/createMigration.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAA;AAqDvD,eAAO,MAAM,eAAe,EAAE,
|
1
|
+
{"version":3,"file":"createMigration.d.ts","sourceRoot":"","sources":["../src/createMigration.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAA;AAqDvD,eAAO,MAAM,eAAe,EAAE,eAwD7B,CAAA"}
|
package/dist/createMigration.js
CHANGED
@@ -10,7 +10,6 @@ Object.defineProperty(exports, "createMigration", {
|
|
10
10
|
});
|
11
11
|
const _utils = require("drizzle-kit/utils");
|
12
12
|
const _fs = /*#__PURE__*/ _interop_require_default(require("fs"));
|
13
|
-
const _migrationTableExists = require("./utilities/migrationTableExists");
|
14
13
|
function _interop_require_default(obj) {
|
15
14
|
return obj && obj.__esModule ? obj : {
|
16
15
|
default: obj
|
@@ -59,27 +58,25 @@ const createMigration = async function createMigration(payload, migrationName) {
|
|
59
58
|
const formattedDate = yyymmdd.replace(/\D/g, '');
|
60
59
|
const formattedTime = hhmmss.split('.')[0].replace(/\D/g, '');
|
61
60
|
const timestamp = `${formattedDate}_${formattedTime}`;
|
62
|
-
const fileName = migrationName ? `${timestamp}_${migrationName.replace(/\W/g, '_')}
|
61
|
+
const fileName = migrationName ? `${timestamp}_${migrationName.replace(/\W/g, '_')}` : `${timestamp}`;
|
63
62
|
const filePath = `${dir}/${fileName}`;
|
64
63
|
let drizzleJsonBefore = getDefaultDrizzleSnapshot();
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
sort: '-name'
|
71
|
-
});
|
72
|
-
if (migrationQuery.docs?.[0]?.schema) {
|
73
|
-
drizzleJsonBefore = migrationQuery.docs[0]?.schema;
|
74
|
-
}
|
64
|
+
// Get latest migration snapshot
|
65
|
+
const latestSnapshot = _fs.default.readdirSync(dir).filter((file)=>file.endsWith('.json')).sort().reverse()?.[0];
|
66
|
+
if (latestSnapshot) {
|
67
|
+
const latestSnapshotJSON = JSON.parse(_fs.default.readFileSync(`${dir}/${latestSnapshot}`, 'utf8'));
|
68
|
+
drizzleJsonBefore = latestSnapshotJSON;
|
75
69
|
}
|
76
70
|
const drizzleJsonAfter = (0, _utils.generateDrizzleJson)(this.schema);
|
77
71
|
const sqlStatementsUp = await (0, _utils.generateMigration)(drizzleJsonBefore, drizzleJsonAfter);
|
78
72
|
const sqlStatementsDown = await (0, _utils.generateMigration)(drizzleJsonAfter, drizzleJsonBefore);
|
79
|
-
|
73
|
+
// write schema
|
74
|
+
_fs.default.writeFileSync(`${filePath}.json`, JSON.stringify(drizzleJsonAfter, null, 2));
|
75
|
+
// write migration
|
76
|
+
_fs.default.writeFileSync(`${filePath}.ts`, migrationTemplate(sqlStatementsUp.length ? sqlStatementsUp?.join('\n') : undefined, sqlStatementsDown.length ? sqlStatementsDown?.join('\n') : undefined));
|
80
77
|
payload.logger.info({
|
81
|
-
msg: `Migration created at ${filePath}`
|
78
|
+
msg: `Migration created at ${filePath}.ts`
|
82
79
|
});
|
83
80
|
};
|
84
81
|
|
85
|
-
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uL3NyYy9jcmVhdGVNaWdyYXRpb24udHMiXSwic291cmNlc0NvbnRlbnQiOlsiLyogZXNsaW50LWRpc2FibGUgbm8tcmVzdHJpY3RlZC1zeW50YXgsIG5vLWF3YWl0LWluLWxvb3AgKi9cbmltcG9ydCB0eXBlIHsgRHJpenpsZVNuYXBzaG90SlNPTiB9IGZyb20gJ2RyaXp6bGUta2l0L3V0aWxzJ1xuaW1wb3J0IHR5cGUgeyBDcmV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SxlQUFlO0lBQ2ZkLFdBQUUsQ0FBQ2dDLGFBQWEsQ0FBQyxDQUFDLEVBQUVuQixTQUFTLEtBQUssQ0FBQyxFQUFFVSxLQUFLVSxTQUFTLENBQUNQLGtCQUFrQixNQUFNO0lBRTVFLGtCQUFrQjtJQUNsQjFCLFdBQUUsQ0FBQ2dDLGFBQWEsQ0FDZCxDQUFDLEVBQUVuQixTQUFTLEdBQUcsQ0FBQyxFQUNoQmxDLGtCQUNFa0QsZ0JBQWdCSyxNQUFNLEdBQUdMLGlCQUFpQk0sS0FBSyxRQUFRQyxXQUN2REwsa0JBQWtCRyxNQUFNLEdBQUdILG1CQUFtQkksS0FBSyxRQUFRQztJQUcvRDVDLFFBQVFFLE1BQU0sQ0FBQ0MsSUFBSSxDQUFDO1FBQUVDLEtBQUssQ0FBQyxxQkFBcUIsRUFBRWlCLFNBQVMsR0FBRyxDQUFDO0lBQUM7QUFDbkUifQ==
|
package/dist/migrate.js
CHANGED
@@ -27,7 +27,7 @@ async function migrate() {
|
|
27
27
|
limit: 0,
|
28
28
|
sort: '-name'
|
29
29
|
}));
|
30
|
-
if (
|
30
|
+
if (Number(existingMigrations[0]?.batch) > 0) {
|
31
31
|
latestBatch = Number(existingMigrations[0]?.batch);
|
32
32
|
}
|
33
33
|
} else {
|
@@ -77,4 +77,4 @@ async function migrate() {
|
|
77
77
|
}
|
78
78
|
}
|
79
79
|
|
80
|
-
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uL3NyYy9taWdyYXRlLnRzIl0sInNvdXJjZXNDb250ZW50IjpbIi8qIGVzbGludC1kaXNhYmxlIG5vLXJlc3RyaWN0ZWQtc3ludGF4LCBuby1hd2FpdC1pbi1sb29wICovXG5pbXBvcnQgeyBnZW5lcmF0ZURyaXp6bGVKc29uIH0gZnJvbSAnZHJpenpsZS1raXQvdXRpbHMnXG5pbXBvcnQgeyByZWFkTWlncmF0aW9uRmlsZXMgfSBmcm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 -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@payloadcms/db-postgres",
|
3
|
-
"version": "0.1.0-beta.
|
3
|
+
"version": "0.1.0-beta.11",
|
4
4
|
"description": "The officially supported Postgres database adapter for Payload",
|
5
5
|
"repository": "https://github.com/payloadcms/payload",
|
6
6
|
"license": "MIT",
|
@@ -24,8 +24,8 @@
|
|
24
24
|
"devDependencies": {
|
25
25
|
"@types/pg": "8.10.2",
|
26
26
|
"@types/to-snake-case": "1.0.0",
|
27
|
-
"
|
28
|
-
"
|
27
|
+
"@payloadcms/eslint-config": "0.0.1",
|
28
|
+
"payload": "2.0.0-beta.13"
|
29
29
|
},
|
30
30
|
"peerDependencies": {
|
31
31
|
"better-sqlite3": "^8.5.0"
|