diff --git a/migrations/20201117160240_create_fkfor_room_restrictions.down.fizz b/migrations/20201117160240_create_fkfor_room_restrictions.down.fizz new file mode 100644 index 0000000..93f9e93 --- /dev/null +++ b/migrations/20201117160240_create_fkfor_room_restrictions.down.fizz @@ -0,0 +1,2 @@ +drop_foreign_key("room_restrictions", "room_restrictions_restrictions_id_fk", {}) +drop_foreign_key("room_restrictions", "room_restrictions_rooms_id_fk", {}) \ No newline at end of file diff --git a/migrations/20201117160240_create_fkfor_room_restrictions.up.fizz b/migrations/20201117160240_create_fkfor_room_restrictions.up.fizz new file mode 100644 index 0000000..d017b57 --- /dev/null +++ b/migrations/20201117160240_create_fkfor_room_restrictions.up.fizz @@ -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", +}) \ No newline at end of file