This commit is contained in:
xiaojunnuo
2026-01-09 01:26:11 +08:00
parent 52689049ae
commit ad2aa2eff5
2 changed files with 3 additions and 1 deletions

View File

@@ -1,4 +1,4 @@
ALTER TABLE cd_site_info ADD COLUMN ip_sync_auto boolean DEFAULT (0);
ALTER TABLE cd_site_info ADD COLUMN ip_sync_auto boolean DEFAULT (1);
ALTER TABLE pi_pipeline ADD COLUMN webhook_key varchar(100);
ALTER TABLE pi_pipeline ADD COLUMN trigger_count integer DEFAULT (0);

View File

@@ -37,7 +37,9 @@ function transformPG() {
let pgSql = sqliteSql.replaceAll(/AUTOINCREMENT/g, 'GENERATED BY DEFAULT AS IDENTITY');
pgSql = pgSql.replaceAll(/datetime/g, 'timestamp');
pgSql = pgSql.replaceAll(/boolean DEFAULT \(0\)/g, 'boolean DEFAULT (false)');
pgSql = pgSql.replaceAll(/boolean DEFAULT \(1\)/g, 'boolean DEFAULT (true)');
pgSql = pgSql.replaceAll(/boolean.*NOT NULL DEFAULT \(0\)/g, 'boolean NOT NULL DEFAULT (false)');
pgSql = pgSql.replaceAll(/boolean.*NOT NULL DEFAULT \(1\)/g, 'boolean NOT NULL DEFAULT (true)');
pgSql = pgSql.replaceAll(/integer/g, 'bigint');
pgSql = pgSql.replaceAll(/INTEGER/g, 'bigint');
pgSql = pgSql.replaceAll(/last_insert_rowid\(\)/g, 'LASTVAL()');