-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
Add ability to set schema to a single UID schema. #2895
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
manishrjain
reviewed
Jan 15, 2019
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.
Reviewed the PR, and did a func rename. Good to be merged.
Reviewed 8 of 14 files at r1, 1 of 3 files at r2, 5 of 6 files at r3.
Reviewable status: 12 of 14 files reviewed, all discussions resolved (waiting on @manishrjain)
MichelDiz
added a commit
to dgraph-io/tutorial
that referenced
this pull request
Feb 15, 2019
Rectifying changes of uid syntax in favor of dgraph-io/dgraph#2895
danielmai
pushed a commit
that referenced
this pull request
Mar 1, 2019
…or in the docs. (#3002) * Fixed a writing error in docs * Preparing changes of uid syntax * association. And fixed a writing error in the docs. Rectifying changes of uid syntax in favor of #2895 Some predicates need to be revised if they even need the change. According to its purpose (like "rated" is it a list or a single 1 to 1?). As far as I can analyze, it is okay.
Closed
dna2github
pushed a commit
to dna2fork/dgraph
that referenced
this pull request
Jul 19, 2019
dna2github
pushed a commit
to dna2fork/dgraph
that referenced
this pull request
Jul 19, 2019
…or in the docs. (dgraph-io#3002) * Fixed a writing error in docs * Preparing changes of uid syntax * association. And fixed a writing error in the docs. Rectifying changes of uid syntax in favor of dgraph-io#2895 Some predicates need to be revised if they even need the change. According to its purpose (like "rated" is it a list or a single 1 to 1?). As far as I can analyze, it is okay.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR addresses #2511.
New uid schemas can be defined using "uid" or "[uid]". The first option will ensure a 1-to-1 association. The second schema will behave like previous versions of Dgraph behaved.
Trying to add another predicate to a 1-to-1 uid predicate will return an error. The options are either to delete the existing predicate first or to change the schema to "[uid]". This behavior is different than what happens for the reset of the types (the existing predicate is overwritten). Since this is a breaking change, we don't want to cause existing users to overwrite their data inadvertedly. Eventually, the behavior will be changed to match the behavior of the other types.
Breaking change. It will be included as part of the 1.1 release.
This change is