mirror of
https://github.com/fosrl/pangolin.git
synced 2026-01-28 22:00:51 +00:00
Merge branch 'dev' of github.com:fosrl/pangolin into dev
This commit is contained in:
@@ -65,10 +65,6 @@ export default async function migration() {
|
|||||||
`ALTER TABLE resources ADD COLUMN resourceGuid TEXT DEFAULT 'PLACEHOLDER';`
|
`ALTER TABLE resources ADD COLUMN resourceGuid TEXT DEFAULT 'PLACEHOLDER';`
|
||||||
).run();
|
).run();
|
||||||
|
|
||||||
db.prepare(
|
|
||||||
`CREATE UNIQUE INDEX resources_resourceGuid_unique ON resources ('resourceGuid');`
|
|
||||||
).run();
|
|
||||||
|
|
||||||
// 2. Select all rows
|
// 2. Select all rows
|
||||||
const rows = db.prepare(`SELECT resourceId FROM resources`).all() as {
|
const rows = db.prepare(`SELECT resourceId FROM resources`).all() as {
|
||||||
resourceId: number;
|
resourceId: number;
|
||||||
@@ -83,6 +79,10 @@ export default async function migration() {
|
|||||||
updateStmt.run(randomUUID(), row.resourceId);
|
updateStmt.run(randomUUID(), row.resourceId);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
db.prepare(
|
||||||
|
`CREATE UNIQUE INDEX resources_resourceGuid_unique ON resources ('resourceGuid');`
|
||||||
|
).run();
|
||||||
|
|
||||||
db.prepare(`ALTER TABLE "orgs" ADD COLUMN IF NOT EXISTS "settings" text`).run();
|
db.prepare(`ALTER TABLE "orgs" ADD COLUMN IF NOT EXISTS "settings" text`).run();
|
||||||
})();
|
})();
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user