mirror of
https://github.com/plausible/analytics.git
synced 2024-12-23 01:22:15 +03:00
Shields IP blocklist: migration (#3779)
This commit is contained in:
parent
6a2d7fc0f5
commit
bc467996ab
@ -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
|
Loading…
Reference in New Issue
Block a user