Added some preliminary database stuff; added a script to mock adding a post to the DB
This commit is contained in:
18
db/migrations/0001_add_posts_table.rb
Normal file
18
db/migrations/0001_add_posts_table.rb
Normal file
@ -0,0 +1,18 @@
|
||||
Sequel.migration do
|
||||
|
||||
up do
|
||||
create_table(:posts) do
|
||||
primary_key :id
|
||||
String :text, null: false
|
||||
DateTime :publish_at
|
||||
Boolean :published, default: false
|
||||
DateTime :created_at
|
||||
DateTime :updated_at
|
||||
end
|
||||
end
|
||||
|
||||
down do
|
||||
drop_table(:posts)
|
||||
end
|
||||
|
||||
end
|
Reference in New Issue
Block a user