fix(migration): speed up update and add logs

This commit is contained in:
adlerhurst
2023-06-24 08:54:25 +02:00
parent 8041dd995c
commit c8b4ef28bd
4 changed files with 28 additions and 15 deletions

View File

@@ -35,7 +35,7 @@ func (mig *CorrectCreationDate) Execute(ctx context.Context) (err error) {
defer cancel()
for {
affected := int64(0)
var affected int64
err = crdb.ExecuteTx(ctx, mig.dbClient.DB, nil, func(tx *sql.Tx) error {
if mig.dbClient.Type() == "cockroach" {
if _, err := tx.Exec("SET experimental_enable_temp_tables=on"); err != nil {