16 lines
495 B
Elixir
16 lines
495 B
Elixir
defmodule DrainCloudCore.Repo.Migrations.AddUsers do
|
|
use Ecto.Migration
|
|
|
|
def change do
|
|
create table(:users) do
|
|
add :login, :string, [size: 120]
|
|
add :password, :string
|
|
add :created_at, :utc_datetime, [null: false, default: fragment("CURRENT_TIMESTAMP")]
|
|
add :updated_at, :utc_datetime, [null: false, default: fragment("CURRENT_TIMESTAMP")]
|
|
add :deleted_at, :utc_datetime, [null: true, default: nil]
|
|
end
|
|
|
|
create unique_index(:users, :login)
|
|
end
|
|
end
|