pleroma/priv/repo/migrations/20230618190919_create_domains.exs

19 lines
369 B
Elixir
Raw Normal View History

defmodule Pleroma.Repo.Migrations.CreateDomains do
use Ecto.Migration
def change do
create_if_not_exists table(:domains) do
add(:domain, :citext)
add(:public, :boolean)
timestamps()
end
create_if_not_exists(unique_index(:domains, [:domain]))
alter table(:users) do
add(:domain_id, references(:domains))
end
end
end