-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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 bug with DB-Forge composite foreign keys #4932
Fix bug with DB-Forge composite foreign keys #4932
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks good.
I was wondering if it would be better to leave the string casting in addForeignKey()
method and parse the variables, but using arrays is more natural in this case. I don't think many developers have extended this method so chances that this will break someone's code are low.
I'm fine with these changes, but since we're removing casting in the public method for some variables, please mention this in the changelog (https://github.com/codeigniter4/CodeIgniter4/tree/4.2/user_guide_src/source/changelogs - you will have to create a new file v4.2.0.rst
). We don't wanna surprise anyone.
@michalsn Thanks for the review. I will create a new |
Please rename your last commit to something else. We're not releasing yet. |
f335cf2
to
c829d40
Compare
@paulbalandan I fixed the composition foreign keys exception and added a new test case |
@michalsn are you able to review these changes? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @monkenWu it looks good!
One last thing - you have to rebase to resolve conflicts. If you have never done this before, here is a nice instruction: https://samsonasik.wordpress.com/2015/09/16/practical-git-4-rebasing-conflicted-task-branch-against-primary-branch/
47a2766
to
d002e9a
Compare
@monkenWu can you do a last minute rebase to fix the merge conflicts before we can merge this? |
2f0d056
to
f85a373
Compare
Description
Fixes #4310
Original PR #4931
Change the branch base to 4.2.
I edited the
addForeignKey
method and_processForeignKeys
method ofCodeIgniter\Database\Forge
so that they can define composite foreign keys in an array.Checklist: