draincloud-beam-core/priv/repo/migrations/20240908091209_add_users.exs
2024-09-09 01:19:41 +03:00

16 lines
487 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