Skip to content

test: Add test for is_unique columns #108

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

Merged
merged 1 commit into from
May 11, 2021

Conversation

wasabigeek
Copy link
Contributor

What kind of change does this PR introduce?

Adds a test for is_unique. Follow-up to #105.

{ query: `
SELECT a.attname
FROM pg_index i
JOIN pg_constraint c ON c.conindid = i.indexrelid
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Technically speaking looking at the index alone should be enough (PG uses a unique index to enforce a unique constraint) but I added this for completeness, since we specifically want to create a constraint.

@kiwicopple kiwicopple merged commit 2e9b4cd into supabase:develop May 11, 2021
@kiwicopple
Copy link
Member

Great job @wasabigeek. Really appreciate your help here. If you want to continue contributing to this repo just let me know! There are a lot of things planned (type/schema generators would be amazing)

@wasabigeek wasabigeek deleted the test/unique-constraint branch May 11, 2021 08:51
@wasabigeek
Copy link
Contributor Author

@kiwicopple I'd be open to help! Just might need some guidance here and there :)

@kiwicopple
Copy link
Member

of course! If you see anything interesting just let me know and I'll add as much detail as possible :)

@github-actions
Copy link

🎉 This PR is included in version 0.17.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants