pleroma/priv/repo/migrations/20231005232600_create_status_translations.exs
marcin mikołajczak ac76bc011a Improve auto translate
Signed-off-by: marcin mikołajczak <git@mkljczk.pl>
2024-03-15 11:13:34 +01:00

21 lines
691 B
Elixir

# Pleroma: A lightweight social networking server
# Copyright © 2017-2023 Pleroma Authors <https://pleroma.social/>
# 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