Maybe someone faced the same situation? In my project I have two services. I create database tables using liquebase. When creating a table of permissions, I immediately enter 4 values there using inserts. and everything is buzzing. So, now in the second service (admin panel) I created an apish that allows you to create permissions. When I try to make a record in the table of permissions, in which there are already 4 records, I get an error ERROR: duplicate key value violates unique constraint "permissions_pkey". The error occurs if I make a request 5 times, the record is added for the 5th time. Thanks in advance)
<insert tableName="permissions">
<column name="id" value="1"/>
<column name="name" value="USERS_READ"/>
</insert>
<insert tableName="permissions">
<column name="id" value="2"/>
<column name="name" value="USERS_GET"/>
</insert>
<insert tableName="permissions">
<column name="id" value="3"/>
<column name="name" value="USERS_CREATE"/>
</insert>
<insert tableName="permissions">
<column name="id" value="4"/>
<column name="name" value="USERS_DELETE"/>
</insert>
public class Permission {
@Id
@GeneratedValue(strategy = GenerationType.IDENTITY)
private Long id;
}