Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix conflict with existing add_foreign_key method (#1) #6

Open
wants to merge 1 commit into
base: rails-4-2
Choose a base branch
from
Open

Fix conflict with existing add_foreign_key method (#1) #6

wants to merge 1 commit into from

Conversation

taelor
Copy link

@taelor taelor commented Jul 26, 2017

No description provided.

@@ -222,7 +222,7 @@ def unique_index_name(name, *partition_key_values)
#
def add_references_to_partition_table(*partition_key_values)
configurator.foreign_keys(*partition_key_values).each do |foreign_key|
add_foreign_key(partition_table_name(*partition_key_values),
add_foreign_key_constraint(partition_table_name(*partition_key_values),
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Style comment: Would you mind fixing the indents of rest of the arguments being passed in in the next few lines?

@@ -281,7 +281,7 @@ def unique_index_name(name, *partition_key_values)
#
def add_references_to_partition_table(*partition_key_values)
configurator.foreign_keys(*partition_key_values).each do |foreign_key|
add_foreign_key(partition_table_name(*partition_key_values),
add_foreign_key_constraint(partition_table_name(*partition_key_values),
foreign_key.referencing_field,
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same comment as above, can you fix the indents here?

@dkhofer
Copy link
Owner

dkhofer commented Jul 30, 2017

Couple style comments, otherwise looks good.

hartsick added a commit to meedan/partitioned that referenced this pull request Apr 20, 2023
Previously this was causing an error because ActiveRecord has a add_foreign_key
method with a different signature.

This solution was submitted by someone else in a PR at
dkhofer#6, but was left unmerged.
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