@@ -5,7 +5,10 @@ defmodule Plausible.ClickhouseRepo.Migrations.CreateImportedVisitors do
55 create_if_not_exists table ( :imported_visitors ,
66 primary_key: false ,
77 engine: "MergeTree" ,
8- options: "ORDER BY (site_id, date)"
8+ options: """
9+ ORDER BY (site_id, date)
10+ #{ Plausible.MigrationUtils . table_settings_expr ( ) }
11+ """
912 ) do
1013 add ( :site_id , :UInt64 )
1114 add ( :date , :date )
@@ -19,7 +22,10 @@ defmodule Plausible.ClickhouseRepo.Migrations.CreateImportedVisitors do
1922 create_if_not_exists table ( :imported_sources ,
2023 primary_key: false ,
2124 engine: "MergeTree" ,
22- options: "ORDER BY (site_id, date, source)"
25+ options: """
26+ ORDER BY (site_id, date, source)
27+ #{ Plausible.MigrationUtils . table_settings_expr ( ) }
28+ """
2329 ) do
2430 add ( :site_id , :UInt64 )
2531 add ( :date , :date )
@@ -37,7 +43,10 @@ defmodule Plausible.ClickhouseRepo.Migrations.CreateImportedVisitors do
3743 create_if_not_exists table ( :imported_pages ,
3844 primary_key: false ,
3945 engine: "MergeTree" ,
40- options: "ORDER BY (site_id, date, hostname, page)"
46+ options: """
47+ ORDER BY (site_id, date, hostname, page)
48+ #{ Plausible.MigrationUtils . table_settings_expr ( ) }
49+ """
4150 ) do
4251 add ( :site_id , :UInt64 )
4352 add ( :date , :date )
@@ -52,7 +61,10 @@ defmodule Plausible.ClickhouseRepo.Migrations.CreateImportedVisitors do
5261 create_if_not_exists table ( :imported_entry_pages ,
5362 primary_key: false ,
5463 engine: "MergeTree" ,
55- options: "ORDER BY (site_id, date, entry_page)"
64+ options: """
65+ ORDER BY (site_id, date, entry_page)
66+ #{ Plausible.MigrationUtils . table_settings_expr ( ) }
67+ """
5668 ) do
5769 add ( :site_id , :UInt64 )
5870 add ( :date , :date )
@@ -66,7 +78,10 @@ defmodule Plausible.ClickhouseRepo.Migrations.CreateImportedVisitors do
6678 create_if_not_exists table ( :imported_exit_pages ,
6779 primary_key: false ,
6880 engine: "MergeTree" ,
69- options: "ORDER BY (site_id, date, exit_page)"
81+ options: """
82+ ORDER BY (site_id, date, exit_page)
83+ #{ Plausible.MigrationUtils . table_settings_expr ( ) }
84+ """
7085 ) do
7186 add ( :site_id , :UInt64 )
7287 add ( :date , :date )
@@ -78,7 +93,10 @@ defmodule Plausible.ClickhouseRepo.Migrations.CreateImportedVisitors do
7893 create_if_not_exists table ( :imported_locations ,
7994 primary_key: false ,
8095 engine: "MergeTree" ,
81- options: "ORDER BY (site_id, date, country, region, city)"
96+ options: """
97+ ORDER BY (site_id, date, country, region, city)
98+ #{ Plausible.MigrationUtils . table_settings_expr ( ) }
99+ """
82100 ) do
83101 add ( :site_id , :UInt64 )
84102 add ( :date , :date )
@@ -94,7 +112,10 @@ defmodule Plausible.ClickhouseRepo.Migrations.CreateImportedVisitors do
94112 create_if_not_exists table ( :imported_devices ,
95113 primary_key: false ,
96114 engine: "MergeTree" ,
97- options: "ORDER BY (site_id, date, device)"
115+ options: """
116+ ORDER BY (site_id, date, device)
117+ #{ Plausible.MigrationUtils . table_settings_expr ( ) }
118+ """
98119 ) do
99120 add ( :site_id , :UInt64 )
100121 add ( :date , :date )
@@ -108,7 +129,10 @@ defmodule Plausible.ClickhouseRepo.Migrations.CreateImportedVisitors do
108129 create_if_not_exists table ( :imported_browsers ,
109130 primary_key: false ,
110131 engine: "MergeTree" ,
111- options: "ORDER BY (site_id, date, browser)"
132+ options: """
133+ ORDER BY (site_id, date, browser)
134+ #{ Plausible.MigrationUtils . table_settings_expr ( ) }
135+ """
112136 ) do
113137 add ( :site_id , :UInt64 )
114138 add ( :date , :date )
@@ -122,7 +146,10 @@ defmodule Plausible.ClickhouseRepo.Migrations.CreateImportedVisitors do
122146 create_if_not_exists table ( :imported_operating_systems ,
123147 primary_key: false ,
124148 engine: "MergeTree" ,
125- options: "ORDER BY (site_id, date, operating_system)"
149+ options: """
150+ ORDER BY (site_id, date, operating_system)
151+ #{ Plausible.MigrationUtils . table_settings_expr ( ) }
152+ """
126153 ) do
127154 add ( :site_id , :UInt64 )
128155 add ( :date , :date )
0 commit comments