Skip to content

Commit

Permalink
[nan-103] add composite index (NangoHQ#1395)
Browse files Browse the repository at this point in the history
* [nan-103] add composite index

* [nan-103] update composite index

* [nan-103] run migrations concurrently
  • Loading branch information
khaliqgant authored Dec 6, 2023
1 parent 745cd82 commit 2121e38
Showing 1 changed file with 11 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
const tableName = '_nango_sync_data_records';

exports.config = { transaction: false };

exports.up = function(knex) {
return knex.schema.raw('CREATE INDEX CONCURRENTLY idx_nango_records_composite ON nango._nango_sync_data_records (nango_connection_id, model, created_at, id)');
};

exports.down = function(knex) {
return knex.schema.raw('DROP INDEX CONCURRENTLY idx_nango_records_composite');
};

0 comments on commit 2121e38

Please sign in to comment.