2023-03-05 17:16:24 +01:00
|
|
|
defmodule Chiya.Repo.Migrations.CreateChannels do
|
|
|
|
use Ecto.Migration
|
|
|
|
|
|
|
|
def change do
|
|
|
|
create table(:channels) do
|
|
|
|
add :name, :string
|
|
|
|
add :content, :text
|
|
|
|
add :visibility, :string
|
|
|
|
add :slug, :string
|
|
|
|
|
|
|
|
timestamps()
|
|
|
|
end
|
2023-03-05 18:09:09 +01:00
|
|
|
|
|
|
|
create unique_index(:channels, [:slug])
|
2023-03-05 17:16:24 +01:00
|
|
|
end
|
|
|
|
end
|