Introduce comments below events

Also add tomstones

Signed-off-by: Thomas Citharel <tcit@tcit.fr>
This commit is contained in:
Thomas Citharel
2019-11-15 18:36:47 +01:00
parent 45155a3bde
commit dc07f34d78
71 changed files with 2642 additions and 879 deletions

View File

@@ -0,0 +1,21 @@
defmodule Mobilizon.Storage.Repo.Migrations.AddDeletedAtOnComments do
use Ecto.Migration
def up do
drop_if_exists(constraint(:comments, "comments_actor_id_fkey"))
alter table(:comments) do
add(:deleted_at, :utc_datetime, null: true)
modify(:actor_id, references(:actors, on_delete: :nilify_all), null: true)
end
end
def down do
drop_if_exists(constraint(:comments, "comments_actor_id_fkey"))
alter table(:comments) do
remove(:deleted_at)
modify(:actor_id, references(:actors, on_delete: :nilify_all), null: false)
end
end
end