mobilizon.chapril.org-mobil.../priv/repo/migrations/20191024204726_add_tags_to_comments.exs
Thomas Citharel cc820d6b63
Refactor Core things, including Ecto handling, ActivityPub & Transmogrifier modules
* Data doesn't need anymore to be converted to ActivityStream format to
be saved (this was taken from Pleroma and not at all a good idea here)
* Everything saved when creating an event is inserted into PostgreSQL in
a single transaction
2019-10-31 10:06:11 +01:00

15 lines
396 B
Elixir

defmodule Mobilizon.Storage.Repo.Migrations.AddTagsToComments do
use Ecto.Migration
def up do
create table(:comments_tags, primary_key: false) do
add(:comment_id, references(:comments, on_delete: :delete_all), primary_key: true)
add(:tag_id, references(:tags, on_delete: :nilify_all), primary_key: true)
end
end
def down do
drop(table(:comments_tags))
end
end