package db

import (
	"github.com/tidbcloud/cluster-service-ng/pkg/storage/mysql/schema"
	"gorm.io/gorm"
)

var _ = AddDBMigrateRecord(
	"20251010001",
	func(db *gorm.DB) error {
		err := db.Migrator().DropColumn(&schema.LightweightRestore{}, "source_pd_cluster_id")
		if err != nil {
			return err
		}
		err = db.Migrator().DropColumn(&schema.LightweightRestore{}, "source_bucket")
		if err != nil {
			return err
		}
		err = db.Migrator().DropColumn(&schema.LightweightRestore{}, "source_prefix")
		if err != nil {
			return err
		}
		return nil
	},
)
