logo

pleroma

My custom branche(s) on git.pleroma.social/pleroma/pleroma git clone https://hacktivis.me/git/pleroma.git

20201221203824_create_hashtags_objects.exs (656B)


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