From 5e34258da53421fd3922b484e6dd04df92ff3a02 Mon Sep 17 00:00:00 2001 From: Daniel Salazar Date: Sun, 4 Oct 2026 02:45:03 -0700 Subject: [PATCH] fix: drop database_id from the subdomain reclaim; MySQL has no such column (#4067) reclaimByUuid (#4064) cleared `database_id`, which exists only in the SQLite and Postgres schemas. On MySQL the UPDATE fails with "Unknown column", so ensureSystemSite throws: the puter-profiles row stays registered to the admin, the site keeps 404ing, and every profile save returns 500 as it retries the bootstrap. puter-app-icons takes the same path if its row isn't already protected. System rows never carry a database binding, so there is nothing to clear. --- src/backend/stores/subdomain/SubdomainStore.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/backend/stores/subdomain/SubdomainStore.ts b/src/backend/stores/subdomain/SubdomainStore.ts index b8dd31134..f10148bf9 100644 --- a/src/backend/stores/subdomain/SubdomainStore.ts +++ b/src/backend/stores/subdomain/SubdomainStore.ts @@ -697,11 +697,12 @@ export class SubdomainStore extends PuterStore { const before = await this.getByUuid(uuid, { primary: true }); if (!before) return null; + // No `database_id` here: the MySQL schema has no such column. await this.clients.db.write( `UPDATE \`subdomains\` SET \`user_id\` = ?, \`root_dir_id\` = ?, \`protected\` = \`protected\` OR ?, \`app_owner\` = NULL, \`associated_app_id\` = NULL, - \`database_id\` = NULL, \`domain\` = NULL + \`domain\` = NULL WHERE \`uuid\` = ?`, [userId, rootDirId, this.clients.db.booleanValue(protect), uuid], );