# Pleroma: A lightweight social networking server # Copyright © 2017-2023 Pleroma Authors # SPDX-License-Identifier: AGPL-3.0-only defmodule Pleroma.Repo.Migrations.CreateStatusTranslations do use Ecto.Migration def change do create_if_not_exists table(:status_translations) do add(:activity_id, references(:activities, type: :uuid, on_delete: :delete_all), null: false) add(:language, :text, null: false) add(:provider, :text) add(:detected_source_language, :text) add(:content, {:map, :string}) timestamps() end create_if_not_exists(unique_index(:status_translations, [:activity_id, :language])) end end