Open source, privacy-first web analytics. Lightweight, cookie-free Google Analytics alternative. Self-hosted or cloud.
TypeScript analyticsanalytics-dashboardclickhouseelixirgoogle-analyticsmarketingopen-source-analyticsphoenixplausible-analyticspostgresqlprivacyprivacy-friendlyself-hostedsimple-analyticsstatisticstailwindcssweb-analyticswebsite-analyticswebsite-statswebsite-tracking
Migration: add country rules (#3834)
hq1b7b5dcf4c98a
diff --git a/config/.env.dev b/config/.env.devindex db52322d91..c4bc28dee1 100644--- a/config/.env.dev+++ b/config/.env.dev@@ -8,7 +8,7 @@ TOTP_VAULT_KEY=Q3BD4nddbkVJIPXgHuo5NthGKSIH0yesRfG05J88HIo=ENVIRONMENT=devMAILER_ADAPTER=Bamboo.LocalAdapterLOG_LEVEL=debug-SELFHOST=false+SELFHOST=trueDISABLE_CRON=trueADMIN_USER_IDS=1SHOW_CITIES=truediff --git a/priv/repo/migrations/20240221122626_shield_country_rules.exs b/priv/repo/migrations/20240221122626_shield_country_rules.exsnew file mode 100644index 0000000000..38cf15109b--- /dev/null+++ b/priv/repo/migrations/20240221122626_shield_country_rules.exs@@ -0,0 +1,16 @@+defmodule Plausible.Repo.Migrations.ShieldCountryRules do+ use Ecto.Migration++ def change do+ create table(:shield_rules_country, primary_key: false) do+ add(:id, :uuid, primary_key: true)+ add :site_id, references(:sites, on_delete: :delete_all), null: false+ add :country_code, :text, null: false+ add :action, :string, default: "deny", null: false+ add :added_by, :string+ timestamps()+ end++ create unique_index(:shield_rules_country, [:site_id, :country_code])+ end+end