27fff258623d23cb3a7a6313345159df6b2d79ad
[akkoma] / priv / repo / migrations / 20221203232118_add_user_follows_hashtag.exs
1 defmodule Pleroma.Repo.Migrations.AddUserFollowsHashtag do
2 use Ecto.Migration
3
4 def change do
5 create table(:user_follows_hashtag) do
6 add(:hashtag_id, references(:hashtags))
7 add(:user_id, references(:users, type: :uuid, on_delete: :delete_all))
8 end
9
10 create(unique_index(:user_follows_hashtag, [:user_id, :hashtag_id]))
11 end
12 end