summaryrefslogtreecommitdiff
path: root/priv
diff options
context:
space:
mode:
authorLain Soykaf <lain@lain.com>2025-02-25 16:23:46 +0400
committerLain Soykaf <lain@lain.com>2025-02-25 16:23:46 +0400
commit5851d787b6001c117808d5993ca491d0e58dfaf4 (patch)
tree0bb5d1c39e53e567b5cbdd1f4ac3085d3ac3abcc /priv
parentbee027e51163d980991f4442a3eb3b0429f0fc40 (diff)
parent6f48ade41736ffd5ac02eee445c35516cbbbe907 (diff)
downloadpleroma-5851d787b6001c117808d5993ca491d0e58dfaf4.tar.gz
pleroma-5851d787b6001c117808d5993ca491d0e58dfaf4.zip
Merge branch and resolve conflict in database_test.exs
Diffstat (limited to 'priv')
-rw-r--r--priv/repo/migrations/20221203232118_add_user_follows_hashtag.exs14
1 files changed, 14 insertions, 0 deletions
diff --git a/priv/repo/migrations/20221203232118_add_user_follows_hashtag.exs b/priv/repo/migrations/20221203232118_add_user_follows_hashtag.exs
new file mode 100644
index 000000000..2b5ae91be
--- /dev/null
+++ b/priv/repo/migrations/20221203232118_add_user_follows_hashtag.exs
@@ -0,0 +1,14 @@
+defmodule Pleroma.Repo.Migrations.AddUserFollowsHashtag do
+ use Ecto.Migration
+
+ def change do
+ create table(:user_follows_hashtag) do
+ add(:hashtag_id, references(:hashtags))
+ add(:user_id, references(:users, type: :uuid, on_delete: :delete_all))
+ end
+
+ create(unique_index(:user_follows_hashtag, [:user_id, :hashtag_id]))
+
+ create_if_not_exists(index(:user_follows_hashtag, [:hashtag_id]))
+ end
+end