fix: table name singular
This commit is contained in:
+2
-2
@@ -43,7 +43,8 @@ func Setup() *gorm.DB {
|
|||||||
|
|
||||||
config := &gorm.Config{
|
config := &gorm.Config{
|
||||||
NamingStrategy: schema.NamingStrategy{
|
NamingStrategy: schema.NamingStrategy{
|
||||||
TablePrefix: setting.DatabaseSetting.TablePrefix,
|
TablePrefix: setting.DatabaseSetting.TablePrefix,
|
||||||
|
SingularTable: true,
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -61,7 +62,6 @@ func Setup() *gorm.DB {
|
|||||||
if setting.DatabaseSetting.SqlDebug == "enable" {
|
if setting.DatabaseSetting.SqlDebug == "enable" {
|
||||||
db = db.Debug()
|
db = db.Debug()
|
||||||
}
|
}
|
||||||
|
|
||||||
return db
|
return db
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user