draincloud-beam-core/priv/repo/migrations/20240908091209_add_users.exs

16 lines
495 B
Elixir
Raw Normal View History

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