Shields IP blocklist: migration (#3779)

This commit is contained in:
hq1 2024-02-12 14:29:37 +01:00 committed by GitHub
parent 6a2d7fc0f5
commit bc467996ab
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -0,0 +1,17 @@
defmodule Plausible.Repo.Migrations.AddIpBlockListTable do
use Ecto.Migration
def change do
create table(:shield_rules_ip, primary_key: false) do
add(:id, :uuid, primary_key: true)
add :site_id, references(:sites), null: false
add :inet, :inet
add :action, :string, default: "deny", null: false
add :description, :string
add :added_by, :string
timestamps()
end
create unique_index(:shield_rules_ip, [:site_id, :inet])
end
end