Skip to content

Commit

Permalink
Merge pull request #5104 from NMDSdevopsServiceAdm/fix/indexMigration
Browse files Browse the repository at this point in the history
fix existing index check in migration
  • Loading branch information
Richard-Pentecost authored Jul 20, 2022
2 parents ead54a1 + dfe5ca1 commit b1ce73b
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,9 @@ module.exports = {
up: async (queryInterface, Sequelize) => {
await queryInterface.sequelize.transaction(async (transaction) => {
await Promise.all([
queryInterface.sequelize.query('DROP INDEX IF EXISTS cqc."worker_audit__username";', { transaction }),
queryInterface.sequelize.query('DROP INDEX IF EXISTS cqc."worker_audit__username" ON cqc."WorkerAudit";', {
transaction,
}),
queryInterface.addIndex(
{
tableName: 'WorkerAudit',
Expand Down

0 comments on commit b1ce73b

Please sign in to comment.