Skip to content

Conversation

elv1s
Copy link
Contributor

@elv1s elv1s commented Jan 15, 2019

Description

Support adding and removing foreign key constraints.

Support for adding and removing foreign key constraints. I marked this as WIP since there are a couple of TODO items.

  • support FK table update
  • fix camelCase issue for foreign key ids

I wanted to get some feedback in the meantime.

Related issues

Checklist

  • New tests added or existing tests modified to cover all changes
  • Code conforms with the style
    guide
  • Documentation in README.md was updated
@elv1s
Copy link
Contributor Author

elv1s commented Jan 18, 2019

I'm taking a look at the test failure caused by failure to delete table with FK constraint. This happens inconsistently on my local as well.

There is a test failure which looks like it is coming from datasource-juggler /loopback-datasource-juggler/test/include.test.js:81:14. Anyone know what might be causing this? This happens in master

1) include should report errors if the PK is excluded: Uncaught AssertionError: expected null to exist 
@elv1s elv1s changed the title [WIP] feat - add support for create and delete foreign key constraint from model feat: add support for create and delete foreign key constraint from model Jan 18, 2019
@dhmlau
Copy link
Member

dhmlau commented Jan 18, 2019

Seems like something that @b-admike is trying to fix in PR #1682 and #1683.

@elv1s
Copy link
Contributor Author

elv1s commented Jan 22, 2019

looks like the test is stuck...

All the tests passed locally after pulling in PR #1682 from @b-admike

@dhmlau
Copy link
Member

dhmlau commented Jan 22, 2019

@slnode test please

@dhmlau
Copy link
Member

dhmlau commented Jan 22, 2019

According to @rmg, there was some infrastructure issue regarding CLA. Let me kick off the tests again. If it's still stuck, we'll need help from @rmg.

@elv1s
Copy link
Contributor Author

elv1s commented Jan 22, 2019

Looks like the CLA check is still stuck

@elv1s
Copy link
Contributor Author

elv1s commented Jan 23, 2019

All checks are passing now 👍

@raymondfeng
Copy link
Contributor

@elv1s Please squash your commits into one to make history clean with git rebase -i HEAD~6.

@dhmlau
Copy link
Member

dhmlau commented Jan 24, 2019

@slnode test please

@dhmlau
Copy link
Member

dhmlau commented Jan 24, 2019

@slnode test please
(let's run it again)

@dhmlau dhmlau merged commit 6bdefd3 into loopbackio:master Jan 24, 2019
@dhmlau
Copy link
Member

dhmlau commented Jan 24, 2019

@elv1s, thanks for your contribution. Your PR has landed! 🎉

@elv1s
Copy link
Contributor Author

elv1s commented Jan 25, 2019

Connected issue #348 can be closed.

When will this feature be published?

@dhmlau
Copy link
Member

dhmlau commented Jan 25, 2019

Let me publish now.

@dhmlau
Copy link
Member

dhmlau commented Jan 25, 2019

Done. loopback-connector-postgresql@3.5.1 is published.

@dhmlau dhmlau mentioned this pull request Jan 25, 2019
@elv1s elv1s deleted the feat/foreignkey-constraint branch February 4, 2019 21:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

3 participants