This commit is contained in:
Joey Yakimowich-Payne 2026-01-22 08:08:50 -07:00
commit 22b36f1259
No known key found for this signature in database
GPG key ID: 6BFE655FA5ABD1E1

View file

@ -93,6 +93,8 @@ const runMigrations = () => {
))
.join(', ');
// Disable foreign key checks while rebuilding the users table.
db.exec('PRAGMA foreign_keys = OFF');
db.exec('BEGIN');
db.exec('ALTER TABLE users RENAME TO users_old');
db.exec(`
@ -107,6 +109,7 @@ const runMigrations = () => {
`);
db.exec('DROP TABLE users_old');
db.exec('COMMIT');
db.exec('PRAGMA foreign_keys = ON');
userTableInfo2 = db.prepare("PRAGMA table_info(users)").all() as { name: string }[];
}
if (didDropApiKeyColumns) {