feat(ash): added accounts, user for authentication
This commit is contained in:
parent
80e7041146
commit
f154eea055
5 changed files with 160 additions and 1 deletions
32
priv/repo/migrations/20250530101732_account_migration.exs
Normal file
32
priv/repo/migrations/20250530101732_account_migration.exs
Normal file
|
|
@ -0,0 +1,32 @@
|
|||
defmodule Mv.Repo.Migrations.AccountMigration 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(:users, primary_key: false) do
|
||||
add :id, :uuid, null: false, default: fragment("gen_random_uuid()"), primary_key: true
|
||||
add :email, :text
|
||||
add :password_hash, :text
|
||||
add :oicd_id, :text
|
||||
|
||||
add :member_id,
|
||||
references(:members,
|
||||
column: :id,
|
||||
name: "users_member_id_fkey",
|
||||
type: :uuid,
|
||||
prefix: "public"
|
||||
)
|
||||
end
|
||||
end
|
||||
|
||||
def down do
|
||||
drop constraint(:users, "users_member_id_fkey")
|
||||
|
||||
drop table(:users)
|
||||
end
|
||||
end
|
||||
Loading…
Add table
Add a link
Reference in a new issue