Skip to content

Commit

Permalink
feat: fts on projects and units
Browse files Browse the repository at this point in the history
  • Loading branch information
mkeen committed Dec 13, 2021
1 parent d41dbb9 commit e5297ed
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions migrations/20211212200953-fulltext-search.cjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
'use strict';

module.exports = {
up: async (queryInterface, Sequelize) => {
await queryInterface.sequelize.query("create virtual table Projects using fts5 (warehouseProjectId, currentRegistry, registryOfOrigin, originProjectId, program, projectName, projectLink, projectDeveloper, sector, projectType, coveredByNDC, NDCLinkage, projectStatus, projectStatusDate, unitMetric, methodology, methodologyVersion, validationApproach, validationDate, projectTag, estimatedAnnualAverageEmissionReduction, owner);");
await queryInterface.sequelize.query("create virtual table Units using fts5 (ProjectId, owner, buyer, registry, blockIdentifier, identifier, qualificationId, unitType, unitCount, unitStatus, unitStatusDate, transactionType, unitIssuanceLocation, unitLink, correspondingAdjustment, unitTag, vintageId");
},

down: async (queryInterface, Sequelize) => {
/**
* Add reverting commands here.
*
* Example:
* await queryInterface.dropTable('users');
*/
}
};

0 comments on commit e5297ed

Please sign in to comment.