1 # Pleroma: A lightweight social networking server
2 # Copyright © 2017-2022 Pleroma Authors <https://pleroma.social/>
3 # SPDX-License-Identifier: AGPL-3.0-only
5 defmodule Pleroma.Repo.Migrations.CreateBackups do
9 create_if_not_exists table(:backups) do
10 add(:user_id, references(:users, type: :uuid, on_delete: :delete_all))
11 add(:file_name, :string, null: false)
12 add(:content_type, :string, null: false)
13 add(:processed, :boolean, null: false, default: false)
14 add(:file_size, :bigint)
19 create_if_not_exists(index(:backups, [:user_id]))