Add blueprints to migrations

This commit is contained in:
Owen
2025-10-29 20:50:36 -07:00
parent 0e51bac307
commit 927dda4e53
2 changed files with 32 additions and 0 deletions

View File

@@ -112,6 +112,23 @@ export default async function migration() {
`
).run();
db.prepare(
`
CREATE TABLE 'blueprints' (
'blueprintId' integer PRIMARY KEY AUTOINCREMENT NOT NULL,
'orgId' text NOT NULL,
'name' text NOT NULL,
'source' text NOT NULL,
'createdAt' integer NOT NULL,
'succeeded' integer NOT NULL,
'contents' text NOT NULL,
'message' text,
FOREIGN KEY ('orgId') REFERENCES 'orgs'('orgId') ON UPDATE no action ON DELETE cascade
);
`
).run();
db.prepare(
`CREATE INDEX 'idx_requestAuditLog_timestamp' ON 'requestAuditLog' ('timestamp');`
).run();