pleroma/priv/repo/migrations/20210113150220_create_groups.exs
2021-01-22 15:29:43 +01:00

18 lines
529 B
Elixir

defmodule Pleroma.Repo.Migrations.CreateGroups do
use Ecto.Migration
def change do
create table(:groups, primary_key: false) do
add(:id, :uuid, primary_key: true)
add(:user_id, references(:users, type: :uuid, on_delete: :delete_all), null: false)
add(:owner_id, references(:users, type: :uuid, on_delete: :nilify_all))
add(:members, {:array, :string}, default: [])
add(:name, :text)
add(:description, :text)
add(:members_collection, :text)
timestamps()
end
end
end