fix: drop database_id from the subdomain reclaim; MySQL has no such column (#4067)
Maintain Release Merge PR / update-release-pr (push) Canceled after 0s
Notify HeyPuter / notify (push) Canceled after 0s
release-please / release-please (push) Canceled after 0s

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:
Daniel Salazar authored and GitHub committed 2026-10-04 02:45:03 -07:00
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],
);