SimplQ / simplQ-backend

SimplQ backend, written in Java for AWS
https://simplq.me
GNU General Public License v3.0
17 stars 27 forks source link

Bug: Adding someone with the same name again into the queue doesn't work. #141

Closed daltonfury42 closed 3 years ago

daltonfury42 commented 3 years ago

To reproduce the issue, create a queue on the site here, add a person by any name, and then add again with a different number but same name. It will result in an error.

Looks like an unwanted unique constraint is somehow being created by hibernate or liquibase.

Error returned is:

could not execute statement; SQL [n/a]; constraint [token_name_key]; nested exception is org.hibernate.exception.ConstraintViolationException: could not execute statement
daltonfury42 commented 3 years ago

This is happening because we put this constraint in the liquibase script here.

Liquibase doesn't provide an easy way to drop an unnamed constraint, so we need to do this.