Make migration idempotent

Ref #3759
This commit is contained in:
Owen
2026-09-16 09:08:20 -04:00
parent 847f44197b
commit 4716a2a647
2 changed files with 4 additions and 4 deletions
+2 -2
View File
@@ -16,13 +16,13 @@ export default async function migration() {
db.transaction(() => {
db.prepare(
`
ALTER TABLE 'newt' ADD 'agent' text;
ALTER TABLE 'newt' ADD COLUMN IF NOT EXISTS 'agent' text;
`
).run();
db.prepare(
`
ALTER TABLE 'newt' ADD 'agentVersion' text;
ALTER TABLE 'newt' ADD COLUMN IF NOT EXISTS 'agentVersion' text;
`
).run();
})();