mirror of
https://github.com/samuelncui/yatm.git
synced 2026-11-08 12:26:33 +00:00
Unify file queries and Scan execution, retain indexed Identical results, improve Job and Preview workflows, and verify release packaging.
17 lines
366 B
Go
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
|
|
}
|