support for db-specific options to add_foreign_key#17094
support for db-specific options to add_foreign_key#17094jenseng wants to merge 1 commit intorails:mainfrom
Conversation
:sql_options can be used to pass along arbitrary clauses to the generated ADD FOREIGN KEY statement. also include logic to infer :sql_options for postgres when dumping so that schema.rb is accurate. no such logic is needed for mysql, as it doesn't support any options beyond what's already on master.
|
cc @senny this is more or less analogous to foreigner's
|
|
As outlined in the discussion on #15606 I'd like to start with a basic implementation and then move towards a more complete one. For We are currently discussing the future of When it comes to |
|
@jenseng hey, are you interesting in moving this forward? If so, can you please bring it up-to-date with master, and I will do some review on this PR later to give you some feedback? Otherwise I can take it from here on top of what you did. Thanks! |
|
@carlosantoniodasilva feel free to run with this, it's not currently on my radar. Thanks! |
|
This pull request has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. |
|
I would love to see this get some traction. I'm surprised nobody else has needed DEFERRABLE. It's such a useful tool in some situations. And I really don't want to drop down to structure.sql. |
|
@carlosantoniodasilva any way I can help out here? |
|
This pull request has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. |
|
Closing in favor of #41487. Thank you for the contribution. |
:sql_optionscan be used to pass along arbitrary clauses to the generatedADD FOREIGN KEYstatement, e.g."DEFERRABLE INITIALLY DEFERRED"also include logic to infer
:sql_optionsfor postgres when dumping so thatschema.rb is accurate. no such logic is needed for mysql, as it doesn't
support any options beyond what's already on master.