mirror of
https://github.com/HeyPuter/puter.git
synced 2026-10-11 22:32:26 +00:00
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.
This commit is contained in:
1 parent
51eba174b3
commit
5e34258da5
1 file changed
+2
-1
@@ -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],
|
||||
);
|
||||
|
||||
Reference in new issue
Block a user