1 # Pleroma: A lightweight social networking server
2 # Copyright © 2017-2022 Pleroma Authors <https://pleroma.social/>
3 # SPDX-License-Identifier: AGPL-3.0-only
5 defmodule Pleroma.Repo.Migrations.CreateHashtagsObjects do
9 create_if_not_exists table(:hashtags_objects, primary_key: false) do
10 add(:hashtag_id, references(:hashtags), null: false, primary_key: true)
11 add(:object_id, references(:objects), null: false, primary_key: true)
14 # Note: PK index: "hashtags_objects_pkey" PRIMARY KEY, btree (hashtag_id, object_id)
15 create_if_not_exists(index(:hashtags_objects, [:object_id]))