000000019.go 469 B

12345678910111213141516171819
  1. package migrate
  2. import (
  3. "context"
  4. "golang-fave/engine/sqlw"
  5. )
  6. func Migrate_000000019(ctx context.Context, db *sqlw.DB, host string) error {
  7. if _, err := db.Exec(ctx, `ALTER TABLE shop_products ADD COLUMN custom1 varchar(2048) NOT NULL DEFAULT '' AFTER active;`); err != nil {
  8. return err
  9. }
  10. if _, err := db.Exec(ctx, `ALTER TABLE shop_products ADD COLUMN custom2 varchar(2048) NOT NULL DEFAULT '' AFTER custom1;`); err != nil {
  11. return err
  12. }
  13. return nil
  14. }