Skip to content

Commit

Permalink
Add migration tables
Browse files Browse the repository at this point in the history
  • Loading branch information
abneed committed May 25, 2022
1 parent 9670a2d commit a4737c3
Show file tree
Hide file tree
Showing 8 changed files with 30 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
drop_table("reservations")
10 changes: 10 additions & 0 deletions migrations/20220525224726_create_reservation_table.up.fizz
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
create_table("reservations") {
t.Column("id", "integer", {primary: true})
t.Column("first_name", "string", {"default": ""})
t.Column("last_name", "string", {"default": ""})
t.Column("email", "string", {})
t.Column("phone", "string", {"default": ""})
t.Column("start_date", "date", {})
t.Column("end_date", "date", {})
t.Column("room_id", "integer", {})
}
1 change: 1 addition & 0 deletions migrations/20220525225300_create_rooms_table.down.fizz
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
drop_table("rooms")
4 changes: 4 additions & 0 deletions migrations/20220525225300_create_rooms_table.up.fizz
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
create_table("rooms") {
t.Column("id", "integer", {primary: true})
t.Column("room_name", "string", {"default": ""})
}
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
drop_table("restrictions")
4 changes: 4 additions & 0 deletions migrations/20220525225512_create_restrictions_table.up.fizz
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
create_table("restrictions") {
t.Column("id", "integer", {primary: true})
t.Column("restriction_name", "string", {"default": ""})
}
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
drop_table("room_restrictions")
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
create_table("room_restrictions") {
t.Column("id", "integer", {primary: true})
t.Column("start_date", "date", {})
t.Column("end_date", "date", {})
t.Column("room_id", "integer", {})
t.Column("reservation_id", "integer", {})
t.Column("restriction_id", "integer", {})
}

0 comments on commit a4737c3

Please sign in to comment.