defmodule OhMyExOhIrcd.Repo.Migrations.CreateChannels do
use Ecto.Migration
def change do
create table(:channels) do
# Stored downcased; original-case name is not preserved here (IRC
# channel names are case-insensitive anyway).
add :name, :string, null: false
add :founder_user_id, references(:users, on_delete: :nilify_all)
add :topic, :text, default: "", null: false
timestamps(type: :utc_datetime)
end
create unique_index(:channels, [:name])
create index(:channels, [:founder_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.
559 B · text
History
442a476