Move CH migration from clickhouse_repo/ to ingest_repo/ (#2683)

This commit moves a migration that was created in `clickhouse_repo/` to
its correct folder, `ingest_repo/`. The migration was created in
1cb07efe6d prior the read/write
separation.
ua-device-type
Vini Brasil 4 years ago committed by Uku Taht
parent 8b6738e958
commit 592880a215

@ -68,23 +68,22 @@ Enum.flat_map(-720..0, fn day_index ->
date = Date.add(Date.utc_today(), day_index)
number_of_events = 0..:rand.uniform(500)
events =
Enum.map(number_of_events, fn _ ->
geolocation = Enum.random(geolocations)
Enum.map(number_of_events, fn _ ->
geolocation = Enum.random(geolocations)
[
domain: site.domain,
hostname: site.domain,
timestamp: put_random_time.(date),
referrer_source: Enum.random(["", "Facebook", "Twitter", "DuckDuckGo", "Google"]),
browser: Enum.random(["Edge", "Chrome", "Safari", "Firefox", "Vivaldi"]),
browser_version: to_string(Enum.random(0..50)),
screen_size: Enum.random(["Mobile", "Tablet", "Desktop", "Laptop"]),
operating_system: Enum.random(["Windows", "macOS", "Linux"]),
operating_system_version: to_string(Enum.random(0..15))
]
|> Keyword.merge(geolocation)
|> then(&Plausible.Factory.build(:pageview, &1))
end)
[
domain: site.domain,
hostname: site.domain,
timestamp: put_random_time.(date),
referrer_source: Enum.random(["", "Facebook", "Twitter", "DuckDuckGo", "Google"]),
browser: Enum.random(["Edge", "Chrome", "Safari", "Firefox", "Vivaldi"]),
browser_version: to_string(Enum.random(0..50)),
screen_size: Enum.random(["Mobile", "Tablet", "Desktop", "Laptop"]),
operating_system: Enum.random(["Windows", "macOS", "Linux"]),
operating_system_version: to_string(Enum.random(0..15))
]
|> Keyword.merge(geolocation)
|> then(&Plausible.Factory.build(:pageview, &1))
end)
end)
|> Plausible.TestUtils.populate_stats()

Loading…
Cancel
Save