Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: add more indices #46

Closed
wants to merge 2 commits into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 10 additions & 1 deletion src/createTable.js
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,16 @@ CREATE TABLE IF NOT EXISTS ${table}

await client.query(text, []);

const migrations = [];
const migrations = [
`CREATE INDEX IF NOT EXISTS idx_dimension1 ON matomo(dimension1);
CREATE INDEX IF NOT EXISTS idx_dimension2 ON matomo(dimension2);
CREATE INDEX IF NOT EXISTS idx_dimension3 ON matomo(dimension3);
CREATE INDEX IF NOT EXISTS idx_dimension4 ON matomo(dimension4);
CREATE INDEX IF NOT EXISTS idx_dimension5 ON matomo(dimension5);
CREATE INDEX IF NOT EXISTS idx_userid ON matomo(userid);
CREATE INDEX IF NOT EXISTS idx_actionurl ON matomo(action_url);
CREATE INDEX IF NOT EXISTS idx_region ON matomo(region);`,
];

for (const query of migrations) {
await client.query(query, []);
Expand Down