skip v1 table drop in self-host (#2945)

pull/2937/head^2
ruslandoga 4 years ago committed by GitHub
parent 447ed12155
commit f489d96251
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -2,7 +2,11 @@ defmodule Plausible.IngestRepo.Migrations.CleanUpOldTablesAfterV2Migration do
use Ecto.Migration
def 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)
end
end
end

Loading…
Cancel
Save