Skip to content

Commit

Permalink
Wrap data migration using with_repo to ensure ClickhouseRepo is run…
Browse files Browse the repository at this point in the history
…ning
  • Loading branch information
zoldar committed May 29, 2024
1 parent 2724d02 commit 3eb0a39
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion priv/repo/migrations/20240528115149_migrate_site_imports.exs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,10 @@ defmodule Plausible.Repo.Migrations.MigrateSiteImports do

def up do
if ce?() do
Plausible.DataMigration.SiteImports.run(dry_run?: false)
{:ok, _, _} =
Ecto.Migrator.with_repo(Plausible.ClickhouseRepo, fn _repo ->
Plausible.DataMigration.SiteImports.run(dry_run?: false)
end)
end
end
end

0 comments on commit 3eb0a39

Please sign in to comment.