mirror of
https://github.com/plausible/analytics.git
synced 2024-11-30 00:58:54 +03:00
97e0255a2b
Co-authored-by: Adrian Gruntkowski <adrian.gruntkowski@gmail.com>
18 lines
358 B
Elixir
18 lines
358 B
Elixir
defmodule Plausible.Repo.Migrations.MigrateSiteImports do
|
|
use Plausible
|
|
use Ecto.Migration
|
|
|
|
def up do
|
|
if ce?() do
|
|
{:ok, _, _} =
|
|
Ecto.Migrator.with_repo(Plausible.ClickhouseRepo, fn _repo ->
|
|
Plausible.DataMigration.SiteImports.run(dry_run?: false)
|
|
end)
|
|
end
|
|
end
|
|
|
|
def down do
|
|
raise "Irreversible"
|
|
end
|
|
end
|