Update
This commit is contained in:
27
Server/db/migrations/2019052410085235_create_table_users.jl
Normal file
27
Server/db/migrations/2019052410085235_create_table_users.jl
Normal file
@@ -0,0 +1,27 @@
|
||||
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
|
Reference in New Issue
Block a user