Add roles for users.

This commit is contained in:
2025-04-11 11:04:02 +03:00
parent 9189ee0b14
commit e5dd5a8dde
5 changed files with 152 additions and 0 deletions
@@ -0,0 +1,21 @@
defmodule DecentralisedBookIndex.Repo.Migrations.UpdateUserToAddRole 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
alter table(:users) do
add :role, :text, null: false, default: "user"
end
end
def down do
alter table(:users) do
remove :role
end
end
end