use sequence per tenant
This commit is contained in:
@@ -206,7 +206,8 @@ object Session {
|
||||
.findOne() ?: throw DataNotFoundException
|
||||
}
|
||||
|
||||
private fun seqName(entity: String) = "sequence_$entity"
|
||||
private fun seqName(entity: String) = "sequence_${entity}_${currentTenant()}"
|
||||
|
||||
fun creatSeq(entity: String): Int {
|
||||
return database.sqlUpdate("CREATE SEQUENCE IF NOT EXISTS ${seqName(entity)} START 1;").execute()
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user