added csv and updated migration to work better hopefully (#7)

Reviewed-on: #7
Co-authored-by: Joseph Nelson <joseph.nelson4456@gmail.com>
Co-committed-by: Joseph Nelson <joseph.nelson4456@gmail.com>
This commit was merged in pull request #7.
This commit is contained in:
2026-05-17 22:46:38 -07:00
committed by joseph.nelson4456
parent a4646da6ab
commit 70ad6ae4a6
2 changed files with 198 additions and 82 deletions
@@ -1,9 +1,10 @@
export const up = (pgm) => {
pgm.sql(`
ALTER TABLE "items"
ADD CONSTRAINT "set_id"
ADD COLUMN "set_id" UUID,
ADD CONSTRAINT "fk_set_id"
FOREIGN KEY ("set_id")
REFERENCES "sets" ("id")
REFERENCES "sets"("id")
ON DELETE CASCADE;
`)
}
@@ -11,6 +12,7 @@ export const up = (pgm) => {
export const down = (pgm) => {
pgm.sql(`
ALTER TABLE "items"
DROP CONSTRAINT "fk_name";
DROP COLUMN "set_id",
DROP CONSTRAINT "fk_set_id";
`)
}