Skip to content

Commit

Permalink
add on delete cascade to adminid in the token table
Browse files Browse the repository at this point in the history
  • Loading branch information
t-aleksander committed Nov 8, 2024
1 parent 8e1d348 commit e997db0
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
2 changes: 2 additions & 0 deletions migrations/20241108110157_add_on_delete.down.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
ALTER TABLE token DROP CONSTRAINT enrollment_admin_id_fkey;
ALTER TABLE token ADD CONSTRAINT enrollment_admin_id_fkey FOREIGN KEY(admin_id) REFERENCES "user"(id);
2 changes: 2 additions & 0 deletions migrations/20241108110157_add_on_delete.up.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
ALTER TABLE token DROP CONSTRAINT enrollment_admin_id_fkey;
ALTER TABLE token ADD CONSTRAINT enrollment_admin_id_fkey FOREIGN KEY(admin_id) REFERENCES "user"(id) ON DELETE CASCADE;

0 comments on commit e997db0

Please sign in to comment.