You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on May 13, 2022. It is now read-only.
I'm not sure if this is a bug with schema_plus, or with migration_comments, but the two gems do not cooperate when rules from each are used on the same column. If this is a bug in the other gem I can re-post the issue there; but there seem to be more eyeballs here. See https://github.com/pinnymz/migration_comments
The :references option does not seem to be processed by schema_plus when there is also a :comment option, which causes schema_plus to attempt to create a default foreign key when it should not.
Using:
schema_plus 1.5.3 (latest)
migration_comments 0.3.2 (latest)
Rails ActiveRecord 3.2.16
MySQL
The text was updated successfully, but these errors were encountered:
@dmeranda unfortunately, as per the discussion in SchemaPlus/schema_monkey#6 and pinnymz/migration_comments#19, it's not so much a bug in either schema_plus or migration_comments, but rather an incompatibility due to different implementation methodologies.
TL;dr: migration_comments uses include and alias_method_chain, which was the only game in town prior to ruby 2.0. Whereas schema_plus uses prepend and super, which is generally considered the better approach, but doesn't exist on ruby 1.9. And unfortunately using them at the same time leads to inconsistent results or infinite recursion.
The only solution that I know of would be for migration_comments to "upgrade" to the new methodology or schema_plus to "downgrade".
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
I'm not sure if this is a bug with schema_plus, or with migration_comments, but the two gems do not cooperate when rules from each are used on the same column. If this is a bug in the other gem I can re-post the issue there; but there seem to be more eyeballs here. See https://github.com/pinnymz/migration_comments
An example:
The :references option does not seem to be processed by schema_plus when there is also a :comment option, which causes schema_plus to attempt to create a default foreign key when it should not.
Using:
The text was updated successfully, but these errors were encountered: