analytics/priv/data_migrations/NumericIDs/sql/create-tmp-events-v2.sql.eex
Adam 6637751a5e
Implement Numeric IDs migration (#2762)
* Implement Numeric IDs migration

* Fix typo

* Mute credo for now

* Improve configurability and add stop_t

* Adjust to Ch/Chto only

* Fix opts key for dictionary password

* Add regular ecto migration with numeric ids v2 schemas (#2768)

* Add regular ecto migration

* Fix typo

* Update priv/ingest_repo/migrations/20230320094327_create_v2_schemas.exs

Co-authored-by: Vini Brasil <vini@hey.com>

* Implement v2 events/sessions schema modules (#2777)

* Implement v2 events/sessions schema modules

* Clean up session schemas

---------

Co-authored-by: Vini Brasil <vini@hey.com>

* Update moduledocs

---------

Co-authored-by: Vini Brasil <vini@hey.com>
2023-03-23 09:47:41 +01:00

7 lines
271 B
Elixir

CREATE TABLE IF NOT EXISTS
tmp_events_v2 AS events_v2 ENGINE = MergeTree()
ORDER BY (site_id, toDate(timestamp), name, user_id, timestamp)
PRIMARY KEY (site_id, toDate(timestamp), name, user_id)
PARTITION BY toYYYYMM(timestamp)
<%= @table_settings %>