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
// Remove constraint and index | |
queryInterface.sequelize.query( | |
'ALTER TABLE "project" DROP CONSTRAINT IF EXISTS project_name_key;' | |
).then(function() { | |
return queryInterface.removeIndex('project', 'project_name_key'); | |
}); | |
// Add unique constraint and index | |
queryInterface.addIndex('project', ['name'], { | |
indexName: 'project_name_key', |