Skip to content

Commit

Permalink
dont let the running apps table use auto ID
Browse files Browse the repository at this point in the history
  • Loading branch information
yazz committed Jan 1, 2025
1 parent 8aa89fb commit 82b5ba9
Showing 1 changed file with 8 additions and 7 deletions.
15 changes: 8 additions & 7 deletions public/go.html
Original file line number Diff line number Diff line change
Expand Up @@ -11894,8 +11894,8 @@ <h1 style='width:100%;vertical-align:top;display:inline-block;font-size:100px; t
if (alreadyExists.status == "RUNNING") {

} else {
yz.uiDb.sqlui( "insert into ui_table_running_apps ( code_id , app_instance_id , base_component_id, logo, display_name,component_type) values (?,?,?,?,?,?)",
[code_id, nid , baseComponentId,null, null, null])
yz.uiDb.sqlui( "insert into ui_table_running_apps ( id , code_id , app_instance_id , base_component_id, logo, display_name,component_type) values (?,?,?,?,?,?,?)",
[yz.uiDb.uiDbNextId ++ , code_id, nid , baseComponentId,null, null, null])
}
}
mm.refresh++
Expand Down Expand Up @@ -13968,7 +13968,7 @@ <h1 style='width:100%;vertical-align:top;display:inline-block;font-size:100px; t
*/
tableName: "ui_table_running_apps",
fields: [
{name: "id", fieldType: "INT PRIMARY KEY AUTOINCREMENT"},
{name: "id", fieldType: "INTEGER"},
{name: "app_instance_id", fieldType: "STRING"},
{name: "fk_root_app_instance_id", fieldType: "STRING"},
{name: "parent_app_instance_id", fieldType: "STRING"},
Expand Down Expand Up @@ -14449,11 +14449,12 @@ <h1 style='width:100%;vertical-align:top;display:inline-block;font-size:100px; t
yz.uiDb.sqlui(`
insert into
ui_table_running_apps
( code_id , app_instance_id , base_component_id , logo , display_name,component_type , status )
( id , code_id , app_instance_id , base_component_id , logo , display_name,component_type , status )
values
(?,?,?,?,?,?,?)`
(?,?,?,?,?,?,?,?)`
,
[
yz.uiDb.uiDbNextId ++,
null,
appInstanceId,
baseComponentId,
Expand Down Expand Up @@ -14561,8 +14562,8 @@ <h1 style='width:100%;vertical-align:top;display:inline-block;font-size:100px; t
let alreadyRunningApp = yz.uiDb.sqlui1("select * from ui_table_running_apps where code_id = ? and status = ?", [app.code_id, "RUNNING"])
if (!alreadyRunningApp) {
let nid = yz.mainVars.nextGlobalAppId++;
yz.uiDb.sqlui( "insert into ui_table_running_apps ( app_instance_id , code_id , base_component_id, logo, display_name,component_type,status) values (?,?,?,?,?,?,?)",
[nid, app.code_id,app.base_component_id,app.logo_url, app.displayName, app.component_type, "RUNNING"])
yz.uiDb.sqlui( "insert into ui_table_running_apps ( id , app_instance_id , code_id , base_component_id, logo, display_name,component_type,status) values (?,?,?,?,?,?,?,?)",
[yz.uiDb.uiDbNextId ++, nid, app.code_id,app.base_component_id,app.logo_url, app.displayName, app.component_type, "RUNNING"])
}
},

Expand Down

0 comments on commit 82b5ba9

Please sign in to comment.