This commit is contained in:
byte[] 2021-02-09 17:14:44 -05:00
parent 4be6e23400
commit 8f3965b9f5

View file

@ -2,8 +2,16 @@ defmodule Philomena.Repo.Migrations.AddBanDurationConstraints do
use Ecto.Migration use Ecto.Migration
def change do def change do
create constraint("user_bans", "user_ban_duration_must_be_valid", check: "valid_until < '4000-01-01'") create constraint("user_bans", "user_ban_duration_must_be_valid",
create constraint("subnet_bans", "subnet_ban_duration_must_be_valid", check: "valid_until < '4000-01-01'") check: "valid_until < '4000-01-01'"
create constraint("fingerprint_bans", "fingerprint_ban_duration_must_be_valid", check: "valid_until < '4000-01-01'") )
create constraint("subnet_bans", "subnet_ban_duration_must_be_valid",
check: "valid_until < '4000-01-01'"
)
create constraint("fingerprint_bans", "fingerprint_ban_duration_must_be_valid",
check: "valid_until < '4000-01-01'"
)
end end
end end