1 defmodule Pleroma.Repo.Migrations.CreateHashtagsObjects do
5 create_if_not_exists table(:hashtags_objects, primary_key: false) do
6 add(:hashtag_id, references(:hashtags), null: false)
7 add(:object_id, references(:objects), null: false)
10 create_if_not_exists(unique_index(:hashtags_objects, [:hashtag_id, :object_id]))
11 create_if_not_exists(index(:hashtags_objects, [:object_id]))