defmodule OhMyExOhIrcd.Repo.Migrations.CreateChannelMemberships do
use Ecto.Migration
def change do
create table(:channel_memberships) do
add :channel_id, references(:channels, on_delete: :delete_all), null: false
add :user_id, references(:users, on_delete: :delete_all), null: false
# Stored as string: "founder" | "admin" | "op" | "halfop" | "voice".
# ":member" is not persisted (absence == :member).
add :access, :string, null: false
timestamps(type: :utc_datetime)
end
create unique_index(:channel_memberships, [:channel_id, :user_id])
create index(:channel_memberships, [:user_id])
end
end
neiam
/oh-my-ex-oh-ircd
public · Issues · Pulls · Labels · Forks · Compare · Actions success · Badges · Packages
⭐
Log in to mark this repository.
657 B · text
History
442a476