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

Support custom foreign key names (continued work of #1311) #1726

Merged
merged 6 commits into from Feb 16, 2017

Conversation

Projects
None yet
3 participants
@vellotis
Contributor

vellotis commented Oct 7, 2016

This PR has missing unit tests for PR #1311.

This PR enables declaring custom foreign key name.

t.integer('key_name_id')
  .references('target_table_id')
  .inTable('target_table_name')
  .withKeyName('foreign_key_name')

https://github.com/tgriesser/knex/compare/master...vellotis:feature/support-custom-foreign-key-names?expand=1#diff-b91681a6009d38db70d89305944b4318R166

t.foeign('key_name_id', 'foreign_key_name')
  .references('target_table_id')
  .inTable('target_table')

https://github.com/tgriesser/knex/compare/master...vellotis:feature/support-custom-foreign-key-names?expand=1#diff-b91681a6009d38db70d89305944b4318R173

Closes #1311
Closes #415

@elhigu

This comment has been minimized.

Collaborator

elhigu commented Feb 16, 2017

Thanks! Feature look good 👍 Documentation is needed for this, but I'll include this to next release anyways. knex/documentation#21

Fixed comment
Actually trying to trigger travis to run tests with latest travis configuration... (maybe it just doesn't run tests against merged branch..)

@elhigu elhigu merged commit fe4ec15 into tgriesser:master Feb 16, 2017

1 check passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment