ilyakatz / data-migrate

Migrate and update data alongside your database structure.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Rails 4.1.9

georgediaz88 opened this issue · comments

Hello,

We're trying to upgrade our application to latest Rails version of the 4.1 series and it appears running data migrations is now storing in the wrong table. (i.e. in 'schema_migrations' and not 'data_migrations'). Is there a fix our there or is this a known problem?

Any help would be great.

Thanks!

George Diaz writes:

Hello,

We're trying to upgrade our application to latest Rails version of the 4.1 series and it appears running data migrations is now storing in the wrong table. (i.e. in 'schema_migrations' and not 'data_migrations'). Is there a fix our there or is this a known problem?

Any help would be great.

Thanks!


Reply to this email directly or view it on GitHub:
#22

Sent with my mu4e

any update on this?

@georgediaz88 looks like rails 4.0 made updates to migration process and introduced http://apidock.com/rails/ActiveRecord/SchemaMigration which conflicts with data-migrate code. What do you think if I create a new version data-migrate that has a dependency on rails 4.0 and up. This version will not be backward compatible though, so data-migrate "1.2.0" will not be maintained.

@ilyakatz, this sounds like a reasonable compromise for those of us who'd like to continue using this gem. Thanks.

Ok, cool. I have a working solution in #27, just need to clean it up and create separate branches for the versions, so will try to do this in the coming week

@ilyakatz, that sounds great to me. I'd like to continue using this gem as well. Let me know if you need a hand as well. Thanks.

@georgediaz88 thanks. if you could try it out with that new branch, that would be great. just put this in your gemfile

gem "data_migrate", github: "execonline-inc/data-migrate", 
  branch: "fix_data_migration_table"

@ilyakatz, just tried your branch and it worked! I was able to add a new data migration, run the data migrate command, and see it in the data_migrations table. So, this worked for me. I'm glad to see this being worked on.

ok, thanks for checking. I want to do a bit more testing to make sure that this doesn't rerun all those data migrations that are recorded in schema_migrations as this could be pretty disastrous. Feel free to poke me again if i don't get it out next week.

yea, totally. Sounds good!

PR #27 has been merged and new version published. Please keep an eye on anything suspicious and open new issues if anything comes up.