Update apps

This commit is contained in:
KernelDeimos
2024-04-12 22:00:36 -04:00
parent fbbc73308e
commit 361e51060a
2 changed files with 10 additions and 0 deletions

View File

@@ -52,6 +52,7 @@ class SqliteDatabaseAccessService extends BaseDatabaseAccessService {
'0003_user-permissions.sql',
'0004_sessions.sql',
'0005_background-apps.sql',
'0006_update-apps.sql',
].map(p => path_.join(__dirname, 'sqlite_setup', p));
const fs = require('fs');
for ( const filename of sql_files ) {
@@ -80,6 +81,10 @@ class SqliteDatabaseAccessService extends BaseDatabaseAccessService {
upgrade_files.push('0005_background-apps.sql');
}
if ( user_version <= 3 ) {
upgrade_files.push('0006_update-apps.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}`);

View File

@@ -0,0 +1,5 @@
UPDATE `apps` SET `index_url` = 'https://builtins.namespaces.puter.com/terminal' WHERE `name` = 'terminal';
INSERT INTO `apps` (`uid`, `owner_user_id`, `name`, `title`, `description`, `godmode`, `background`, `maximize_on_start`, `index_url`, `approved_for_listing`, `approved_for_opening_items`, `approved_for_incentive_program`, `timestamp`, `last_review`, `tags`, `app_owner`) VALUES (
'129e4bfb-4c8a-47e0-bec2-0279c21ace06', 1,
'phoenix','Phoenix Shell','',0,1,1,'https://builtins.namespaces.puter.com/phoenix',1,0,0,'2022-08-16 01:28:47',NULL,'productivity',NULL);