mirror of
https://framagit.org/framasoft/mobilizon.git
synced 2024-12-22 16:03:25 +00:00
9c9f1385fb
Signed-off-by: Thomas Citharel <tcit@tcit.fr>
21 lines
557 B
Elixir
21 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
|