mirror of
https://github.com/fosrl/pangolin.git
synced 2026-09-22 02:28:26 +02:00
Fixed copilot issue.
This commit is contained in:
@@ -15,19 +15,20 @@ export default async function migration() {
|
||||
|
||||
db.transaction(() => {
|
||||
db.prepare(
|
||||
`ALTER TABLE 'resources' RENAME COLUMN 'headers' TO 'requestHeaders';`
|
||||
`ALTER TABLE "resources" RENAME COLUMN "headers" TO "requestHeaders";`
|
||||
).run();
|
||||
db.prepare(
|
||||
`ALTER TABLE 'resources' ADD 'responseHeaders' text;`
|
||||
`ALTER TABLE "resources" ADD "responseHeaders" text;`
|
||||
).run();
|
||||
})();
|
||||
|
||||
db.pragma("foreign_keys = ON");
|
||||
|
||||
console.log("Migrated database");
|
||||
} catch (e) {
|
||||
console.log("Failed to migrate db:", e);
|
||||
throw e;
|
||||
} finally {
|
||||
db.pragma("foreign_keys = ON");
|
||||
db.close();
|
||||
}
|
||||
|
||||
console.log(`${version} migration complete`);
|
||||
|
||||
Reference in New Issue
Block a user