Skip to content

Conversation

@clintmiller
Copy link

This fix addresses an issue with the remove_default_constraint method in the SchemaStatements module. When a database table has both default constraints and foreign key constraints, the return of both constraint tables (by the sp_helpconstraint procedure) break the filtering by constraint name that this method expects to be able to perform successfully. This will break migrations that remove columns with default constraints.

By changing the execution of the stored procedure from select_all to execute_procedure the results are returned in a way that the filtering works as expected.

Hat-tip to gicappa/activerecord-sqlserver-adapter@88e8c87

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants