feat(ash): added accounts, user for authentication

This commit is contained in:
carla 2025-05-30 12:20:47 +02:00 committed by carla
parent 80e7041146
commit f154eea055
5 changed files with 160 additions and 1 deletions

View 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