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
skip v1 table drop in self-host (#2945)
ruslandogaf489d96251c5
diff --git a/priv/ingest_repo/migrations/20230509124919_clean_up_old_tables_after_v2_migration.exs b/priv/ingest_repo/migrations/20230509124919_clean_up_old_tables_after_v2_migration.exsindex b68b8977a1..9102767bd9 100644--- a/priv/ingest_repo/migrations/20230509124919_clean_up_old_tables_after_v2_migration.exs+++ b/priv/ingest_repo/migrations/20230509124919_clean_up_old_tables_after_v2_migration.exs@@ -2,7 +2,11 @@ defmodule Plausible.IngestRepo.Migrations.CleanUpOldTablesAfterV2Migration douse Ecto.Migrationdef change do- drop_if_exists table(:events)- drop_if_exists table(:sessions)+ selfhost? = Application.fetch_env!(:plausible, :is_selfhost)++ unless selfhost? do+ drop_if_exists table(:events)+ drop_if_exists table(:sessions)+ endendend