Add forgotten migration
This commit is contained in:
parent
5afdca7ddf
commit
093649509e
@ -3,15 +3,15 @@ defmodule Pleroma.Repo.Migrations.CreateMedia do
|
|||||||
|
|
||||||
def change do
|
def change do
|
||||||
create_if_not_exists table(:media) do
|
create_if_not_exists table(:media) do
|
||||||
|
add(:actor, :string)
|
||||||
add(:href, :string, null: false)
|
add(:href, :string, null: false)
|
||||||
add(:type, :string, null: false)
|
add(:type, :string, null: false)
|
||||||
add(:media_type, :string, null: false)
|
add(:media_type, :string, null: false)
|
||||||
add(:name, :string)
|
add(:name, :string)
|
||||||
add(:blurhash, :string)
|
add(:blurhash, :string)
|
||||||
add(:meta, :map)
|
add(:meta, :map)
|
||||||
# TODO discuss delete_all option
|
|
||||||
add(:object_id, references(:objects, on_delete: :nothing), null: true)
|
add(:object_id, references(:objects, on_delete: :delete_all), null: true)
|
||||||
add(:user_id, references(:users, type: :uuid, on_delete: :nothing), null: false)
|
|
||||||
|
|
||||||
timestamps()
|
timestamps()
|
||||||
end
|
end
|
||||||
|
Loading…
Reference in New Issue
Block a user