17 lines
399 B
Crystal
17 lines
399 B
Crystal
|
class CreateUsers::V00000000000001 < Avram::Migrator::Migration::V1
|
||
|
def migrate
|
||
|
create table_for(User) do
|
||
|
primary_key id : Int64
|
||
|
|
||
|
add name : String, unique: true
|
||
|
add encrypted_password : String # NOTE: Should really be called 'password_hash'
|
||
|
add email : String?, unique: true
|
||
|
add created_at : Time
|
||
|
end
|
||
|
end
|
||
|
|
||
|
def rollback
|
||
|
drop table_for(User)
|
||
|
end
|
||
|
end
|