缴费
This commit is contained in:
@@ -237,8 +237,8 @@ export function createSqliteAdapter(context) {
|
||||
if (existingSystem && Number(existingSystem.schema_version || 1) < 13) {
|
||||
connection.prepare('UPDATE schema_metadata SET schema_version = 13, app_version = 13 WHERE id = 1').run();
|
||||
}
|
||||
if (existingSystem && Number(existingSystem.schema_version || 1) < 14) {
|
||||
connection.prepare('UPDATE schema_metadata SET schema_version = 14, app_version = 14 WHERE id = 1').run();
|
||||
if (existingSystem && Number(existingSystem.schema_version || 1) < 15) {
|
||||
throw new Error('开发数据库结构已升级到 v15,请先运行 npm run reset-db 重建数据库');
|
||||
}
|
||||
if (existingSystem && Number(existingSystem.app_version || 1) < 2) {
|
||||
const extension = seed();
|
||||
@@ -390,8 +390,8 @@ export function createSqliteAdapter(context) {
|
||||
if (existingSystem && Number(existingSystem.app_version || 1) < 7) {
|
||||
connection.prepare('UPDATE schema_metadata SET schema_version = 7, app_version = 7 WHERE id = 1').run();
|
||||
}
|
||||
if (existingSystem && Number(existingSystem.schema_version || 1) < 14) {
|
||||
connection.prepare('UPDATE schema_metadata SET schema_version = 14, app_version = 14 WHERE id = 1').run();
|
||||
if (existingSystem && Number(existingSystem.schema_version || 1) < 15) {
|
||||
throw new Error('开发数据库结构已升级到 v15,请先运行 npm run reset-db 重建数据库');
|
||||
}
|
||||
|
||||
if (!connection.prepare('SELECT id FROM schema_metadata WHERE id = 1').get()) {
|
||||
@@ -400,7 +400,7 @@ export function createSqliteAdapter(context) {
|
||||
try {
|
||||
connection.prepare(`
|
||||
INSERT INTO schema_metadata (id, schema_version, app_version, self_registration_enabled, created_at)
|
||||
VALUES (1, 14, ?, ?, ?)
|
||||
VALUES (1, 15, ?, ?, ?)
|
||||
`).run(Number(initialState.meta?.version || 1), initialState.settings?.selfRegistrationEnabled ? 1 : 0, initialState.meta?.createdAt || new Date().toISOString());
|
||||
for (const item of buildSeedOperations(initialState)) connection.prepare(item.sql).run(...item.params);
|
||||
connection.exec('COMMIT');
|
||||
|
||||
Reference in New Issue
Block a user