fix: use AutoMigrate for new SQLite tables instead of hardcoded migrations
LocalPartnumberBook and LocalPartnumberBookItem added to AutoMigrate list in localdb.go — consistent with all other local tables. Removed incorrectly added addPartnumberBooks/addVendorSpecColumn functions from migrations.go (vendor_spec column is handled by AutoMigrate via the LocalConfiguration model field). Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -142,6 +142,8 @@ func New(dbPath string) (*LocalDB, error) {
|
||||
&LocalRemoteMigrationApplied{},
|
||||
&LocalSyncGuardState{},
|
||||
&PendingChange{},
|
||||
&LocalPartnumberBook{},
|
||||
&LocalPartnumberBookItem{},
|
||||
); err != nil {
|
||||
return nil, fmt.Errorf("migrating sqlite database: %w", err)
|
||||
}
|
||||
|
||||
@@ -864,3 +864,4 @@ WHERE id IN (SELECT id FROM ranked)
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user