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

16 lines
487 B
Elixir
Raw Normal View History

defmodule DrainCloudCore.Repo.Migrations.AddUsers do
use Ecto.Migration
def change do
create table(:users) do
2024-09-08 22:19:41 +00:00
add :login, :string, size: 120
add :password, :string
2024-09-08 22:19:41 +00:00
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