|
@@ -10,9 +10,6 @@ import ( |
|
@@ -10,9 +10,6 @@ import ( |
10
|
"github.com/go-pg/pg/v10"
|
10
|
"github.com/go-pg/pg/v10"
|
11
|
"github.com/go-pg/pg/v10/orm"
|
11
|
"github.com/go-pg/pg/v10/orm"
|
12
|
"gitlab.fjmaimaimai.com/allied-creation/allied-creation-user/pkg/constant"
|
12
|
"gitlab.fjmaimaimai.com/allied-creation/allied-creation-user/pkg/constant"
|
13
|
-
|
|
|
14
|
- //_ "gitlab.fjmaimaimai.com/allied-creation/allied-creation-user/pkg/infrastructure/pg/models"
|
|
|
15
|
- "github.com/linmadan/egglib-go/persistent/pg/hooks"
|
|
|
16
|
)
|
13
|
)
|
17
|
|
14
|
|
18
|
var DB *pg.DB
|
15
|
var DB *pg.DB
|
|
@@ -25,7 +22,7 @@ func init() { |
|
@@ -25,7 +22,7 @@ func init() { |
25
|
Addr: fmt.Sprintf("%s:%s", constant.POSTGRESQL_HOST, constant.POSTGRESQL_PORT),
|
22
|
Addr: fmt.Sprintf("%s:%s", constant.POSTGRESQL_HOST, constant.POSTGRESQL_PORT),
|
26
|
})
|
23
|
})
|
27
|
if !constant.DISABLE_SQL_GENERATE_PRINT {
|
24
|
if !constant.DISABLE_SQL_GENERATE_PRINT {
|
28
|
- DB.AddQueryHook(hooks.SqlGeneratePrintHook{})
|
25
|
+ DB.AddQueryHook(SqlGeneratePrintHook{})
|
29
|
}
|
26
|
}
|
30
|
if !constant.DISABLE_CREATE_TABLE {
|
27
|
if !constant.DISABLE_CREATE_TABLE {
|
31
|
for _, model := range []interface{}{
|
28
|
for _, model := range []interface{}{
|