Add option to modify HTTP pool size
[akkoma] / priv / repo / migrations / 20200602150528_create_chat_message_reference.exs
1 # Pleroma: A lightweight social networking server
2 # Copyright © 2017-2021 Pleroma Authors <https://pleroma.social/>
3 # SPDX-License-Identifier: AGPL-3.0-only
4
5 defmodule Pleroma.Repo.Migrations.CreateChatMessageReference do
6 use Ecto.Migration
7
8 def change do
9 create table(:chat_message_references, primary_key: false) do
10 add(:id, :uuid, primary_key: true)
11 add(:chat_id, references(:chats, on_delete: :delete_all), null: false)
12 add(:object_id, references(:objects, on_delete: :delete_all), null: false)
13 add(:seen, :boolean, default: false, null: false)
14
15 timestamps()
16 end
17
18 create(index(:chat_message_references, [:chat_id, "id desc"]))
19 end
20 end