site-libsoc/Server/db/migrations/2019052410085235_create_tab...

27 lines
622 B
Julia
Raw Normal View History

2023-06-15 01:41:54 +07:00
module CreateTableUsers
import SearchLight.Migrations: create_table, column, primary_key, add_index, drop_table
function up()
create_table(:users) do
[
primary_key()
column(:email, :string)
column(:password, :string, limit = 100)
column(:name, :string)
column(:profile_picture, :int)
column(:country, :int)
column(:newsletter, :bool)
column(:notifications, :int)
column(:confirmation_code, :string)
]
end
add_index(:users, :email)
end
function down()
drop_table(:users)
end
end