Skip to content

Commit 78bbc40

Browse files
committed
compile and update migration package
1 parent 00b9c31 commit 78bbc40

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

pkg/migrations/mysql/main_20240531163411_trades_created.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,11 @@ func init() {
1212

1313
func up_main_tradesCreated(ctx context.Context, tx rockhopper.SQLExecutor) (err error) {
1414
// This code is executed when the migration is applied.
15-
_, err = tx.ExecContext(ctx, "ALTER TABLE `trades` ADD COLUMN `inserted_at` DATETIME DEFAULT CURRENT_TIMESTAMP NOT NULL AFTER `traded_at`;")
15+
_, err = tx.ExecContext(ctx, "ALTER TABLE `trades` ADD COLUMN `inserted_at` DATETIME(3) DEFAULT CURRENT_TIMESTAMP NOT NULL AFTER `traded_at`;")
1616
if err != nil {
1717
return err
1818
}
19-
_, err = tx.ExecContext(ctx, "UPDATE `trades` SET `inserted_at`=`traded_at`;")
19+
_, err = tx.ExecContext(ctx, "UPDATE `trades` SET `inserted_at` = `traded_at`;")
2020
if err != nil {
2121
return err
2222
}

0 commit comments

Comments
 (0)