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 index for title #961

Merged
merged 1 commit into from
Jun 4, 2023

Conversation

mohammedzeglam-pg
Copy link
Contributor

in ecto docs it says

The unique constraint works by relying on the database to check if the unique constraint has been violated or not and, if so, Ecto converts it into a changeset error.

so if you do not do this it will not show error when you insert new post with title already exists and just inserted

in ecto docs it says
> The unique constraint works by relying on the database to check if the unique constraint has been violated or not and, if so, Ecto converts it into a changeset error.

so if you do not do this it will not show error when you insert new post with title already exists and just inserted
@BrooklinJazz BrooklinJazz merged commit b093520 into DockYard-Academy:main Jun 4, 2023
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.

2 participants