Skip to content

Commit 4078a63

Browse files
committed
tweak: maximize dev center on start
1 parent ad56091 commit 4078a63

File tree

2 files changed

+10
-1
lines changed

2 files changed

+10
-1
lines changed

src/backend/src/services/database/SqliteDatabaseAccessService.js

+6-1
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ class SqliteDatabaseAccessService extends BaseDatabaseAccessService {
4242
this.db = new Database(this.config.path);
4343

4444
// Database upgrade logic
45-
const TARGET_VERSION = 19;
45+
const TARGET_VERSION = 20;
4646

4747
if ( do_setup ) {
4848
this.log.noticeme(`SETUP: creating database at ${this.config.path}`);
@@ -68,6 +68,7 @@ class SqliteDatabaseAccessService extends BaseDatabaseAccessService {
6868
'0019_fix-0016.sql',
6969
'0020_dev-center.sql',
7070
'0021_app-owner-id.sql',
71+
'0022_dev-center-max.sql',
7172
].map(p => path_.join(__dirname, 'sqlite_setup', p));
7273
const fs = require('fs');
7374
for ( const filename of sql_files ) {
@@ -160,6 +161,10 @@ class SqliteDatabaseAccessService extends BaseDatabaseAccessService {
160161
upgrade_files.push('0021_app-owner-id.sql');
161162
}
162163

164+
if ( user_version <= 19 ) {
165+
upgrade_files.push('0022_dev-center-max.sql');
166+
}
167+
163168
if ( upgrade_files.length > 0 ) {
164169
this.log.noticeme(`Database out of date: ${this.config.path}`);
165170
this.log.noticeme(`UPGRADING DATABASE: ${user_version} -> ${TARGET_VERSION}`);
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
-- fixing owner IDs for default apps;
2+
-- they should all be owned by 'default_user'
3+
4+
UPDATE `apps` SET `maximize_on_start`=1 WHERE `uid`='app-0b37f054-07d4-4627-8765-11bd23e889d4';

0 commit comments

Comments
 (0)