-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
[Tech Debt] Refactor domain queries for performance -- Production
- Loading branch information
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
/** | ||
* @param { import("knex").Knex } knex | ||
Check warning on line 2 in migrations/20240819182419_add_jsonb_data_index_ua.js GitHub Actions / lint
Check warning on line 2 in migrations/20240819182419_add_jsonb_data_index_ua.js GitHub Actions / lint
Check warning on line 2 in migrations/20240819182419_add_jsonb_data_index_ua.js GitHub Actions / lint
Check warning on line 2 in migrations/20240819182419_add_jsonb_data_index_ua.js GitHub Actions / lint
|
||
* @returns { Promise<void> } | ||
*/ | ||
exports.up = function (knex) { | ||
return knex.schema.raw( | ||
"CREATE INDEX analytics_data_ua_gin_jsonb ON analytics_data USING gin(data jsonb_path_ops)", | ||
); | ||
}; | ||
|
||
/** | ||
* @param { import("knex").Knex } knex | ||
Check warning on line 12 in migrations/20240819182419_add_jsonb_data_index_ua.js GitHub Actions / lint
Check warning on line 12 in migrations/20240819182419_add_jsonb_data_index_ua.js GitHub Actions / lint
Check warning on line 12 in migrations/20240819182419_add_jsonb_data_index_ua.js GitHub Actions / lint
Check warning on line 12 in migrations/20240819182419_add_jsonb_data_index_ua.js GitHub Actions / lint
|
||
* @returns { Promise<void> } | ||
*/ | ||
exports.down = function (knex) { | ||
return knex.schema.table("analytics_data", (table) => { | ||
table.dropIndex("analytics_data_gin_jsonb"); | ||
}); | ||
}; |