sequelize / sequelize/sequelize

queryInterface.removeIndex with a wrong name

Open
#9,895 5 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

breaking change status: understood
Dominant language
TypeScript
Stars
30.4k
Forks
4.3k
Avg merge
1d 6h
Merged PRs (30d)
68

Description

What are you doing?

Creating migrations and testing them: db:migrate then db:migrate:undo

What do you expect to happen?

Doing it with addIndex and removeIndex with a wrong name I'd expect it to fail and complain.

What is actually happening?

But it just removed the migration from SequelizeMeta and said all is OK. However the index was not removed! And the next db:migrate failed!

Dialect: sqlite
Dialect version: 3
Sequelize version: 4.38.0
Sequelize cli version: 4.1.0
Tested with latest release: Yes

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the SQLite migration sequence with db:migrate and db:migrate:undo, using queryInterface.removeIndex with an incorrect name. Check that the failed removal reports an error and leaves SequelizeMeta and the index state consistent; the issue does not name a specific file or test.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, node.js, sqlite
Domain
cli, database
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.