DBFlow icon indicating copy to clipboard operation
DBFlow copied to clipboard

Migrations - Unable to add new column and define an index on it using same migration version.

Open petroski77 opened this issue 11 years ago • 3 comments

Hi!

I'm trying to do the following:

  1. Define an AlterTableMigration which adds a new column to an existing table.
  2. Define an indexMigration which adds an index to the new column.

It seems to go wrong because DBFlow runs the IndexMigration first and secondly the AlterTableMigration.

I can make it work if I add the column in version x and the index in version x+1, but I would really like do it in the same version.

Best regards Christian

petroski77 avatar Jul 23 '15 12:07 petroski77

good idea. I think what I can do is add a priority for migrations, such that one gets executed before another?

agrosner avatar Jul 23 '15 14:07 agrosner

Thank you for your fast response!

Yes, that would be a perfect solution :)

petroski77 avatar Jul 23 '15 19:07 petroski77

its in develop @petroski77 so def in 2.3.0

agrosner avatar Aug 21 '15 01:08 agrosner