N-FIN-42: add default category column to entity

This commit is contained in:
Markus Thielker 2024-03-17 11:31:17 +01:00
parent 74bb618706
commit 5556901115
No known key found for this signature in database
2 changed files with 17 additions and 7 deletions

View file

@ -0,0 +1,7 @@
-- AlterTable
ALTER TABLE "entities"
ADD COLUMN "default_category_id" INTEGER;
-- AddForeignKey
ALTER TABLE "entities"
ADD CONSTRAINT "entities_default_category_id_fkey" FOREIGN KEY ("default_category_id") REFERENCES "categories" ("id") ON DELETE SET NULL ON UPDATE CASCADE;