-
-
Notifications
You must be signed in to change notification settings - Fork 206
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Utilize correct db error when the duplicate database is created (#39)
As per http://v2.gorm.io/docs/conventions.html#TableName TableName() suppose to generate static names only (it could not be dynamic). The same source suggests a workaround that I implemented as DynamicCasbinRuleTable along with a scoped DB object for NewAdapterByDBUsePrefix. As a result of 2. we can remove tablePrefix from global state Signed-off-by: l1ghtman2k <aibek.zhil@gmail.com>
- Loading branch information
1 parent
ac27d59
commit 81c2dc6
Showing
1 changed file
with
10 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters