mirror of
https://github.com/fosrl/pangolin.git
synced 2026-05-28 03:32:20 +00:00
New columns
This commit is contained in:
@@ -346,6 +346,14 @@ export default async function migration() {
|
||||
ALTER TABLE "siteResources" DROP COLUMN "protocol";
|
||||
`);
|
||||
|
||||
await db.execute(sql`
|
||||
ALTER TABLE "resources" ADD "health" varchar;
|
||||
`);
|
||||
|
||||
await db.execute(sql`
|
||||
ALTER TABLE "resources" ADD "wildcard" boolean DEFAULT false NOT NULL;
|
||||
`);
|
||||
|
||||
await db.execute(sql`COMMIT`);
|
||||
console.log("Migrated database");
|
||||
} catch (e) {
|
||||
|
||||
@@ -330,6 +330,17 @@ export default async function migration() {
|
||||
ALTER TABLE 'sites' ADD 'networkId' integer REFERENCES networks(networkId);
|
||||
`
|
||||
).run();
|
||||
db.prepare(
|
||||
`
|
||||
ALTER TABLE 'resources' ADD 'health' text;
|
||||
`
|
||||
).run();
|
||||
db.prepare(
|
||||
`
|
||||
ALTER TABLE 'resources' ADD 'wildcard' integer DEFAULT false NOT NULL;
|
||||
`
|
||||
).run();
|
||||
|
||||
})();
|
||||
|
||||
db.pragma("foreign_keys = ON");
|
||||
|
||||
Reference in New Issue
Block a user