Closed offset-null1 closed 2 years ago
@tangyang9464 @imp2002
@OutOfEastGate
@offset-null1 Thank you for your feedback. I will deal with it soon.
@offset-null1 are you a user or contributor?
@hsluoyz I'm using this module to contribute to this issue.
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.
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.
:tada: This issue has been resolved in version 2.4.0 :tada:
The release is available on:
v2.4.0
Your semantic-release bot :package::rocket:
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.