000000020.go 322 B

123456789101112131415
  1. package migrate
  2. import (
  3. "context"
  4. "golang-fave/engine/sqlw"
  5. )
  6. func Migrate_000000020(ctx context.Context, db *sqlw.DB, host string) error {
  7. if _, err := db.Exec(ctx, `ALTER TABLE shop_products ADD COLUMN price_promo float(8,2) NOT NULL DEFAULT '0.00' AFTER price_old;`); err != nil {
  8. return err
  9. }
  10. return nil
  11. }