From 2437d2c02947be4e352c73f566301a799555840a Mon Sep 17 00:00:00 2001 From: psychedelicious <4822129+psychedelicious@users.noreply.github.com> Date: Wed, 8 Oct 2025 16:54:12 +1100 Subject: [PATCH] fix(db): migration 22 insert only real cols --- .../shared/sqlite_migrator/migrations/migration_22.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/invokeai/app/services/shared/sqlite_migrator/migrations/migration_22.py b/invokeai/app/services/shared/sqlite_migrator/migrations/migration_22.py index 7d715c200c..bf97cbd00a 100644 --- a/invokeai/app/services/shared/sqlite_migrator/migrations/migration_22.py +++ b/invokeai/app/services/shared/sqlite_migrator/migrations/migration_22.py @@ -46,7 +46,11 @@ class Migration22Callback: ) # Step 3: Copy all data from the old table to the new table - cursor.execute("INSERT INTO models SELECT * FROM models_old;") + # Only copy the stored columns (id, config, created_at, updated_at), not the virtual columns + cursor.execute( + "INSERT INTO models (id, config, created_at, updated_at) " + "SELECT id, config, created_at, updated_at FROM models_old;" + ) # Step 4: Drop the old table cursor.execute("DROP TABLE models_old;")