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