Skip to content
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 unique constraint to key column #53

Merged

Conversation

lnschroeder
Copy link
Contributor

@lnschroeder lnschroeder commented Oct 16, 2023

Closes #43

Please merge #52 first, before merging this PR.

@lnschroeder lnschroeder changed the title 43 add unique constraint to key column Add unique constraint to key column Oct 16, 2023
dangoslen and others added 2 commits November 1, 2023 17:26
* Adds relationship label types and parser

* Lookup label based on pk and fk names; overrides omitting the label and the constraint label

* First full working version

* Use a map for faster lookup

* Fix example labels

* Adds comments for label regex

* Adds basic tests for relationship label map
Copy link
Owner

@KarnerTh KarnerTh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also great work, thanks 👍🏼
Could you rebase/merge the branch and publish the PR? Also if you find the time, could you add test cases for each database that validates if the unique key is successfully determined?

@lnschroeder
Copy link
Contributor Author

lnschroeder commented Nov 16, 2023

I had already marked the label.label column as unique inside the test/db-table-setup.sql, which gets validated for each database in database/database_integration_test.go.
Isn't that enough or do I miss something?

@lnschroeder lnschroeder marked this pull request as ready for review November 16, 2023 10:21
@KarnerTh
Copy link
Owner

My bad, that's perfectly enough!

@KarnerTh KarnerTh merged commit bb145c8 into KarnerTh:master Nov 18, 2023
@lnschroeder lnschroeder deleted the 43-add-unique-constraint-to-key-column branch November 20, 2023 10:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add unique constraint to key column
3 participants