mirror of
https://github.com/fosrl/pangolin.git
synced 2026-03-31 02:39:26 +00:00
Add missing colums to migrations
This commit is contained in:
@@ -177,6 +177,8 @@ export default async function migration() {
|
||||
sql`CREATE INDEX "idx_accessAuditLog_siteResourceId" ON "connectionAuditLog" USING btree ("siteResourceId");`
|
||||
);
|
||||
await db.execute(sql`ALTER TABLE "userInvites" DROP COLUMN "roleId";`);
|
||||
await db.execute(sql`ALTER TABLE "siteProvisioningKeys" ADD COLUMN "approveNewSites" boolean DEFAULT true NOT NULL;`);
|
||||
await db.execute(sql`ALTER TABLE "sites" ADD COLUMN "status" varchar;`);
|
||||
|
||||
await db.execute(sql`COMMIT`);
|
||||
console.log("Migrated database");
|
||||
|
||||
@@ -191,6 +191,8 @@ export default async function migration() {
|
||||
`ALTER TABLE 'user' ADD 'marketingEmailConsent' integer DEFAULT false;`
|
||||
).run();
|
||||
db.prepare(`ALTER TABLE 'user' ADD 'locale' text;`).run();
|
||||
db.prepare(`ALTER TABLE 'siteProvisioningKeys' ADD COLUMN 'approveNewSites' integer DEFAULT 1 NOT NULL;`).run();
|
||||
db.prepare(`ALTER TABLE 'sites' ADD COLUMN 'status' text;`).run();
|
||||
})();
|
||||
|
||||
db.pragma("foreign_keys = ON");
|
||||
|
||||
Reference in New Issue
Block a user