pleroma/priv/repo/migrations/20210113150220_create_groups.exs

18 lines
529 B
Elixir
Raw Normal View History

2021-01-22 09:29:43 -05:00
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