597 B · text History 6280797
defmodule GitGud.Repo.Migrations.DefaultBlockSelfApprovalOn do
use Ecto.Migration
# New repos stop authors approving their own pull requests.
#
# Only the default moves. Existing repos keep whatever they have —
# switching a live repo's review rules out from under it is the
# owner's call, not a migration's.
def up do
alter table(:repositories) do
modify :block_self_approval, :boolean, null: false, default: true
end
end
def down do
alter table(:repositories) do
modify :block_self_approval, :boolean, null: false, default: false
end
end
end