EmpaticoOrg / scenic-mysql_adapter

MySQL adapter for thoughtbot/scenic
MIT License
30 stars 15 forks source link

Migration methods (:create_view, :update_view, ...) signature mismatch with the scenic gem #12

Closed dreig closed 3 years ago

dreig commented 3 years ago

EDIT: I was wrong. There may be some issues in my own code. EDIT 2: There is an issue with how invert_create_view, and there is a corresponding https://github.com/scenic-views/scenic/issues/286 in the scenic repo

The migration methods (create_view, update_view,...) in the scenic gem use keyword arguments for specifying the sql_definition and version see here, while this gem uses two positional parameters

This currently leads to errors when running rails db:rollback as it attempts to generate an inverse migration for create_view, and fails because the scenic gem expects the optional arguments to be a hash: see here I will solve this issue for myself by explicitly writing both the up and down versions of the migration.

But, I think this gem should conform to the method signatures expected by the scenic gem.

cainlevy commented 3 years ago

@dreig It's quite possible for this MySQL adapter to drift out of date from scenic upstream. Thanks for raising the issue.

I'm currently able to look at pull requests, but I'm not actively maintaining compatibility as my current project did not choose Ruby/MySQL.