-
Notifications
You must be signed in to change notification settings - Fork 183
fix: honor non-unique property constraint #438
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
Conversation
Connector does not honor non-unique constraint definition for a property declaration in model json file on automigrate.
Example model json file snipet:
"properties": [
"email": {
"type": "String",
"index": {
"unique": false
}
}
]
error generated: "could not create unique index "[modelname] _email_idx"
|
Can one of the admins verify this patch? To accept patch and trigger a build add comment ".ok\W+to\W+test." |
|
@ewrayjohnson, thanks for the PR. Could you please take care of a few things first?
FYI - Here is the instruction on how to change the commit message: https://help.github.com/en/github/committing-changes-to-your-project/changing-a-commit-message. Thanks. |
bajtos
left a comment
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.
Thank you @ewrayjohnson for the pull request.
Please add tests to verify your fixes and prevent regressions in the future. See test/postgresql.autoupdate.test.js for inspiration. I am not sure if the approach used by the existing tests can verify what indexes are created, feel free to run a direct SQL query to obtain information about the indexes in the database, for example:
ds.execute(
'SELECT * from information_schema.key_column_usage',
function(err, result) => {
// ...
}
);|
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
|
This issue has been closed due to continued inactivity. Thank you for your understanding. If you believe this to be in error, please contact one of the code owners, listed in the |
|
We just switch the contribution method from CLA to DCO, making your contribution easier in the future. Please sign the commits with DCO by amending your commit messages with Please refer to this docs page for details. Thanks! For more questions, please join our Slack workspace - #loopback-contributors. |
|
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
|
This issue has been closed due to continued inactivity. Thank you for your understanding. If you believe this to be in error, please contact one of the code owners, listed in the |
Fixes: Fix - fail to honor non-unique property constraint #389
Connector does not honor non-unique constraint definition for a property declaration in model json file on automigrate.
Example model json file snipet:
error generated: "could not create unique index "[modelname] _email_idx"