migration about user role "pending" - #877

This commit is contained in:
Laurent Gay
2025-09-19 16:38:04 +02:00
parent 48addc2c94
commit 1367ef4dd9
2 changed files with 7 additions and 4 deletions

View File

@@ -1,13 +1,9 @@
defmodule Mobilizon.Storage.Repo.Migrations.AddModerationToUser do
use Ecto.Migration
alias Mobilizon.Users.UserRole
def change do
alter table(:users) do
add(:moderation, :string, default: "")
end
UserRole.create_type()
end
end

View File

@@ -0,0 +1,7 @@
defmodule Mobilizon.Storage.Repo.Migrations.AddModerationToUser do
use Ecto.Migration
def change do
execute("ALTER TYPE user_role ADD VALUE IF NOT EXISTS 'pending';")
end
end