Added Hashtag entity and objects-hashtags association with auto-sync with `data.tag...
[akkoma] / priv / repo / migrations / 20201221202251_create_hashtags.exs
1 defmodule Pleroma.Repo.Migrations.CreateHashtags do
2 use Ecto.Migration
3
4 def change do
5 create_if_not_exists table(:hashtags) do
6 add(:name, :citext, null: false)
7 add(:data, :map, default: %{})
8
9 timestamps()
10 end
11
12 create_if_not_exists(unique_index(:hashtags, [:name]))
13 end
14 end