Closed zquestz closed 8 years ago
When I do migrations they work, until I try to roll back. I hunted down the bug.
desert-0.5.2/lib/desert/plugin_migrations/2.1/migrator.rb
This line: ActiveRecord::Base.connection.update("DELETE FROM #{sm_table} WHERE version = '#{version}' WHERE plugin_name = '#{current_plugin.name}'")
Should be:
ActiveRecord::Base.connection.update("DELETE FROM #{sm_table} WHERE version = '#{version}' AND plugin_name = '#{current_plugin.name}'")
Now everything works as expected. I would have forked this and sent you my change, but github no longer builds gems =(
this is fixed in 0.5.3
When I do migrations they work, until I try to roll back. I hunted down the bug.
desert-0.5.2/lib/desert/plugin_migrations/2.1/migrator.rb
This line: ActiveRecord::Base.connection.update("DELETE FROM #{sm_table} WHERE version = '#{version}' WHERE plugin_name = '#{current_plugin.name}'")
Should be:
ActiveRecord::Base.connection.update("DELETE FROM #{sm_table} WHERE version = '#{version}' AND plugin_name = '#{current_plugin.name}'")
Now everything works as expected. I would have forked this and sent you my change, but github no longer builds gems =(