todo/backend/db/migrations/20210723170518920_create_users.cr

20 lines
395 B
Crystal
Raw Normal View History

2021-07-24 21:17:10 +00:00
require "jennifer"
class CreateUsers < Jennifer::Migration::Base
def up
create_table :users do |t|
t.string :id, {:primary => true}
t.string :email
t.bool :discord_only_account
t.string :discord_id, {:null => true}
t.string :password_hash, {:null => true}
t.timestamps
end
end
def down
drop_table :users if table_exists? :users
end
end