Files
yatm/internal/executor/archive/schema.go
T
Samuel Cui 4fef653b71 Prepare YATM v1.0.0-alpha.2
Unify file queries and Scan execution, retain indexed Identical results,
improve Job and Preview workflows, and verify release packaging.
2026-10-05 19:08:49 +08:00

17 lines
366 B
Go

package archive
import (
"context"
"fmt"
"gorm.io/gorm"
)
func ensureSchema(ctx context.Context, db *gorm.DB) error {
// Existing bundles pass the shared format gate before their database is opened.
if err := db.WithContext(ctx).AutoMigrate(&Config{}, &Item{}); err != nil {
return fmt.Errorf("prepare Archive Job schema failed, %w", err)
}
return nil
}