mirror of
https://github.com/team-alembic/ash_authentication.git
synced 2024-09-20 05:13:10 +12:00
a939dde9b9
This is missing a bunch of features that you probably want to use (eg confirmation, password resets), but it's a pretty good place to put a stake in the sand and say it works.
23 lines
No EOL
730 B
Elixir
23 lines
No EOL
730 B
Elixir
defmodule Example.Repo.Migrations.MigrateResources1 do
|
|
@moduledoc """
|
|
Updates resources based on their most recent snapshots.
|
|
|
|
This file was autogenerated with `mix ash_postgres.generate_migrations`
|
|
"""
|
|
|
|
use Ecto.Migration
|
|
|
|
def up do
|
|
create table(:user_with_username, primary_key: false) do
|
|
add :id, :uuid, null: false, default: fragment("uuid_generate_v4()"), primary_key: true
|
|
add :username, :citext, null: false
|
|
add :hashed_password, :text, null: false
|
|
add :created_at, :utc_datetime_usec, null: false, default: fragment("now()")
|
|
add :updated_at, :utc_datetime_usec, null: false, default: fragment("now()")
|
|
end
|
|
end
|
|
|
|
def down do
|
|
drop table(:user_with_username)
|
|
end
|
|
end |