-
Notifications
You must be signed in to change notification settings - Fork 39
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
casbin_sequence
is generated even when casbin_rule
table is made beforehand using GenerationType.IDENTITY
#59
Comments
@offset-null1 Thank you for your feedback. I will deal with it soon. |
@offset-null1 are you a user or contributor? |
Yes, that prevents the creation of `casbin_sequence` but as the default is
true, I feel before generating the sequence there should be a check if the
table exists or not. In my case I didn't set it to false but had a table
already created, still the sequence was generated i.e., I ended up having 2
sequences in the database.
|
I know what you mean.By default, we create casbin_sequence. If you have your own requirements, you can modify the parameters of casbin_sequence directly.In mybatis adapter, sequence is not created by default. Of course, we will refine this section to check the existence of the table before creating the casbin_sequence. |
Okay, thank you for the clarification.
|
🎉 This issue has been resolved in version 2.4.0 🎉 The release is available on:
Your semantic-release bot 📦🚀 |
I implicitly created
casbin_rule
table with Id generation type asIDENTITY
. But it createdcasbin_sequence
which wasn't required and happened because ofcase "PostgreSQL": sql = renderActualSql("CREATE SEQUENCE IF NOT EXISTS CASBIN_SEQUENCE START 1;");
in
JDBCBaseAdapter.java
.It should only be executed when the table doesn't exist otherwise the generation of sequence is redundant.
The text was updated successfully, but these errors were encountered: