package migrations import ( "context" "github.com/uptrace/bun" ) func init() { migrations.MustRegister(func(ctx context.Context, db *bun.DB) error { _, err := db.ExecContext(ctx, "CREATE INDEX IF NOT EXISTS"+ " player_snapshots_server_key_date_idx ON player_snapshots(server_key, date);") return err }, func(ctx context.Context, db *bun.DB) error { _, err := db.ExecContext(ctx, "DROP INDEX IF EXISTS player_snapshots_server_key_date_idx;") return err }) }