|
|
|
|
@ -13,6 +13,7 @@ import (
|
|
|
|
|
"time" |
|
|
|
|
|
|
|
|
|
entSQL "entgo.io/ent/dialect/sql" |
|
|
|
|
"entgo.io/ent/dialect/sql/schema" |
|
|
|
|
"github.com/go-sql-driver/mysql" |
|
|
|
|
|
|
|
|
|
// Register postgres driver.
|
|
|
|
|
@ -56,7 +57,7 @@ func (m *MySQL) Open(logger log.Logger) (storage.Storage, error) {
|
|
|
|
|
client.WithTxIsolationLevel(sql.LevelSerializable), |
|
|
|
|
) |
|
|
|
|
|
|
|
|
|
if err := databaseClient.Schema().Create(context.TODO()); err != nil { |
|
|
|
|
if err := databaseClient.Schema().Create(context.TODO(), schema.WithAtlas(true)); err != nil { |
|
|
|
|
return nil, err |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|