Skip to content

Commit

Permalink
Add jsonb index on the v1.1 (UA) table
Browse files Browse the repository at this point in the history
  • Loading branch information
levinmr committed Aug 19, 2024
1 parent 5e9b80d commit 6ed64ee
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions migrations/20240819182419_add_jsonb_data_index_ua.js
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

View workflow job for this annotation

GitHub Actions / lint

Missing JSDoc @param "knex" description
* @returns { Promise<void> }
*/
exports.up = function (knex) {
return knex.schema.raw(
"CREATE INDEX analytics_data_gin_jsonb ON analytics_data_ga4 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

View workflow job for this annotation

GitHub Actions / lint

Missing JSDoc @param "knex" description
* @returns { Promise<void> }
*/
exports.down = function (knex) {
return knex.schema.table("analytics_data_ga4", (table) => {
table.dropIndex("analytics_data_gin_jsonb");
});
};

0 comments on commit 6ed64ee

Please sign in to comment.