@socialgouv/matomo-postgres 1.5.0 → 1.5.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/src/createTable.js +12 -12
package/package.json
CHANGED
package/src/createTable.js
CHANGED
|
@@ -61,18 +61,18 @@ CREATE TABLE IF NOT EXISTS ${table}
|
|
|
61
61
|
await client.query(text, []);
|
|
62
62
|
|
|
63
63
|
const migrations = [
|
|
64
|
-
`CREATE INDEX IF NOT EXISTS idx_dimension1 ON
|
|
65
|
-
CREATE INDEX IF NOT EXISTS idx_dimension2 ON
|
|
66
|
-
CREATE INDEX IF NOT EXISTS idx_dimension3 ON
|
|
67
|
-
CREATE INDEX IF NOT EXISTS idx_dimension4 ON
|
|
68
|
-
CREATE INDEX IF NOT EXISTS idx_dimension5 ON
|
|
69
|
-
CREATE INDEX IF NOT EXISTS idx_userid ON
|
|
70
|
-
CREATE INDEX IF NOT EXISTS idx_actionurl ON
|
|
71
|
-
CREATE INDEX IF NOT EXISTS idx_region ON
|
|
72
|
-
`ALTER TABLE
|
|
73
|
-
ALTER TABLE
|
|
74
|
-
ALTER TABLE
|
|
75
|
-
CREATE INDEX IF NOT EXISTS idx_visitorid ON
|
|
64
|
+
`CREATE INDEX IF NOT EXISTS idx_dimension1 ON ${table}(dimension1);
|
|
65
|
+
CREATE INDEX IF NOT EXISTS idx_dimension2 ON ${table}(dimension2);
|
|
66
|
+
CREATE INDEX IF NOT EXISTS idx_dimension3 ON ${table}(dimension3);
|
|
67
|
+
CREATE INDEX IF NOT EXISTS idx_dimension4 ON ${table}(dimension4);
|
|
68
|
+
CREATE INDEX IF NOT EXISTS idx_dimension5 ON ${table}(dimension5);
|
|
69
|
+
CREATE INDEX IF NOT EXISTS idx_userid ON ${table}(userid);
|
|
70
|
+
CREATE INDEX IF NOT EXISTS idx_actionurl ON ${table}(action_url);
|
|
71
|
+
CREATE INDEX IF NOT EXISTS idx_region ON ${table}(region);`,
|
|
72
|
+
`ALTER TABLE ${table} ADD COLUMN IF NOT EXISTS visitorid text;
|
|
73
|
+
ALTER TABLE ${table} ADD COLUMN IF NOT EXISTS referrertype text;
|
|
74
|
+
ALTER TABLE ${table} ADD COLUMN IF NOT EXISTS referrername text;
|
|
75
|
+
CREATE INDEX IF NOT EXISTS idx_visitorid ON ${table}(visitorid);`,
|
|
76
76
|
];
|
|
77
77
|
|
|
78
78
|
for (const query of migrations) {
|