mirror of
https://github.com/casdoor/casdoor.git
synced 2025-05-23 02:35:49 +08:00
feat: fix bug that there is already an object named 'casbin_api_rule' in the database (#3680)
This commit is contained in:
parent
131820e34e
commit
5417a90223
@ -191,12 +191,7 @@ func (adapter *Adapter) InitAdapter() error {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
var tableName string
|
tableName := adapter.Table
|
||||||
if driverName == "mssql" {
|
|
||||||
tableName = fmt.Sprintf("[%s]", adapter.Table)
|
|
||||||
} else {
|
|
||||||
tableName = adapter.Table
|
|
||||||
}
|
|
||||||
|
|
||||||
adapter.Adapter, err = xormadapter.NewAdapterByEngineWithTableName(engine, tableName, "")
|
adapter.Adapter, err = xormadapter.NewAdapterByEngineWithTableName(engine, tableName, "")
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user