mobilizon.chapril.org-mobil.../priv/repo/migrations/20200717142633_rename_conversations_to_discussions.exs
Thomas Citharel 9c9f1385fb
Introduce group posts
Signed-off-by: Thomas Citharel <tcit@tcit.fr>
2020-07-30 16:55:35 +02:00

22 lines
557 B
Elixir

defmodule Mobilizon.Storage.Repo.Migrations.RenameConversationsToDiscussions do
use Ecto.Migration
def up do
rename(table("conversations"), to: table("discussions"))
rename(table("comments"), :conversation_id, to: :discussion_id)
alter table(:actors) do
add(:discussions_url, :string, null: true)
end
end
def down do
rename(table("discussions"), to: table("conversations"))
rename(table("comments"), :discussion_id, to: :conversation_id)
alter table(:actors) do
remove(:discussions_url)
end
end
end