Skip to content

Commit

Permalink
foreign keys
Browse files Browse the repository at this point in the history
  • Loading branch information
tsawler committed Apr 5, 2021
1 parent e9f38ad commit 6c8fe33
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
drop_foreign_key("room_restrictions", "room_restrictions_restrictions_id_fk", {})
drop_foreign_key("room_restrictions", "room_restrictions_rooms_id_fk", {})
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
add_foreign_key("room_restrictions", "room_id", {"rooms": ["id"]}, {
"on_delete": "cascade",
"on_update": "cascade",
})

add_foreign_key("room_restrictions", "restriction_id", {"restrictions": ["id"]}, {
"on_delete": "cascade",
"on_update": "cascade",
})

0 comments on commit 6c8fe33

Please sign in to comment.