Skip to content

Commit

Permalink
migrations
Browse files Browse the repository at this point in the history
  • Loading branch information
tsawler committed Apr 5, 2021
1 parent 3cc5f1d commit 1b21330
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 1 deletion.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
.idea
.DS_Store
coverage.out
coverage.out
run.sh
13 changes: 13 additions & 0 deletions database.yml.example
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
development:
dialect: postgres
database: bookings
user:
password:
host: 127.0.0.1
pool: 5

test:
url: {{envOr "TEST_DATABASE_URL" "postgres://postgres:[email protected]:5432/myapp_test"}}

production:
url: {{envOr "DATABASE_URL" "postgres://postgres:[email protected]:5432/myapp_production"}}
1 change: 1 addition & 0 deletions migrations/20201116173120_create_user_table.down.fizz
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
sql("drop table users")
8 changes: 8 additions & 0 deletions migrations/20201116173120_create_user_table.up.fizz
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
create_table("users") {
t.Column("id", "integer", {primary: true})
t.Column("first_name", "string", {"default": ""})
t.Column("last_name", "string", {"default": ""})
t.Column("email", "string", {})
t.Column("password", "string", {"size": 60})
t.Column("access_level", "integer", {"default": 1})
}

0 comments on commit 1b21330

Please sign in to comment.