-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #272 from 18F/develop
[Tech Debt] Refactor domain queries for performance -- Staging
- Loading branch information
Showing
2 changed files
with
22 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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
|
||
* @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
|
||
* @returns { Promise<void> } | ||
*/ | ||
exports.down = function (knex) { | ||
return knex.schema.table("analytics_data", (table) => { | ||
table.dropIndex("analytics_data_gin_jsonb"); | ||
}); | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters