|
@@ -42,7 +42,7 @@ class SqliteDatabaseAccessService extends BaseDatabaseAccessService {
|
|
|
this.db = new Database(this.config.path);
|
|
|
|
|
|
// Database upgrade logic
|
|
|
- const TARGET_VERSION = 19;
|
|
|
+ const TARGET_VERSION = 20;
|
|
|
|
|
|
if ( do_setup ) {
|
|
|
this.log.noticeme(`SETUP: creating database at ${this.config.path}`);
|
|
@@ -68,6 +68,7 @@ class SqliteDatabaseAccessService extends BaseDatabaseAccessService {
|
|
|
'0019_fix-0016.sql',
|
|
|
'0020_dev-center.sql',
|
|
|
'0021_app-owner-id.sql',
|
|
|
+ '0022_dev-center-max.sql',
|
|
|
].map(p => path_.join(__dirname, 'sqlite_setup', p));
|
|
|
const fs = require('fs');
|
|
|
for ( const filename of sql_files ) {
|
|
@@ -160,6 +161,10 @@ class SqliteDatabaseAccessService extends BaseDatabaseAccessService {
|
|
|
upgrade_files.push('0021_app-owner-id.sql');
|
|
|
}
|
|
|
|
|
|
+ if ( user_version <= 19 ) {
|
|
|
+ upgrade_files.push('0022_dev-center-max.sql');
|
|
|
+ }
|
|
|
+
|
|
|
if ( upgrade_files.length > 0 ) {
|
|
|
this.log.noticeme(`Database out of date: ${this.config.path}`);
|
|
|
this.log.noticeme(`UPGRADING DATABASE: ${user_version} -> ${TARGET_VERSION}`);
|