summaryrefslogtreecommitdiff
path: root/priv/repo/migrations/20201221202251_create_hashtags.exs
diff options
context:
space:
mode:
Diffstat (limited to 'priv/repo/migrations/20201221202251_create_hashtags.exs')
-rw-r--r--priv/repo/migrations/20201221202251_create_hashtags.exs13
1 files changed, 13 insertions, 0 deletions
diff --git a/priv/repo/migrations/20201221202251_create_hashtags.exs b/priv/repo/migrations/20201221202251_create_hashtags.exs
new file mode 100644
index 000000000..8d2e9ae66
--- /dev/null
+++ b/priv/repo/migrations/20201221202251_create_hashtags.exs
@@ -0,0 +1,13 @@
+defmodule Pleroma.Repo.Migrations.CreateHashtags do
+ use Ecto.Migration
+
+ def change do
+ create_if_not_exists table(:hashtags) do
+ add(:name, :citext, null: false)
+
+ timestamps()
+ end
+
+ create_if_not_exists(unique_index(:hashtags, [:name]))
+ end
+end