From 23882637b50fcb339d3eb277308630c96b2459ba Mon Sep 17 00:00:00 2001 From: Michael Chus Date: Sat, 21 Feb 2026 17:07:44 +0300 Subject: [PATCH] fix: use AutoMigrate for new SQLite tables instead of hardcoded migrations MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 --- internal/localdb/localdb.go | 2 ++ internal/localdb/migrations.go | 1 + 2 files changed, 3 insertions(+) diff --git a/internal/localdb/localdb.go b/internal/localdb/localdb.go index 79a05e5..80928e6 100644 --- a/internal/localdb/localdb.go +++ b/internal/localdb/localdb.go @@ -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) } diff --git a/internal/localdb/migrations.go b/internal/localdb/migrations.go index adaeebe..1dc8d04 100644 --- a/internal/localdb/migrations.go +++ b/internal/localdb/migrations.go @@ -864,3 +864,4 @@ WHERE id IN (SELECT id FROM ranked) return nil } +