Merge pull request 'Add dark and light theme mode to docs, detection, and button...
[akkoma] / priv / repo / migrations / 20211121000000_create_user_notes.exs
1 defmodule Pleroma.Repo.Migrations.CreateUserNotes do
2 use Ecto.Migration
3
4 def change do
5 create_if_not_exists table(:user_notes) do
6 add(:source_id, references(:users, type: :uuid, on_delete: :delete_all))
7 add(:target_id, references(:users, type: :uuid, on_delete: :delete_all))
8 add(:comment, :string)
9
10 timestamps()
11 end
12
13 create_if_not_exists(unique_index(:user_notes, [:source_id, :target_id]))
14 end
15 end