departurerb / departure

Percona's pt-online-schema-change runner for ActiveRecord migrations.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

add_index is not using running through Percona for ActiveRecord >= 6.1

fabioperrella opened this issue · comments

Hi there!

Because of this condition, the method add_index is not running through Percona for ActiveRecord > 6.1 because it does not run an "ALTER TABLE" query, which is required here to use the command line.

Is that on purpose?

From what I saw, this conditional was added to use the same code as ActiveRecord 6.1 uses when adding an index here, but I think it is "skipping" the command line accidentally.

If I'm right, what about adding "CREATE INDEX" as a type of query that should run via command line?