use sequence per tenant
This commit is contained in:
1 parent
0c9313b77c
commit
d51c8c7547
2 files changed
+5
-15
No files matched your search
@@ -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