mirror of
https://github.com/invoke-ai/InvokeAI.git
synced 2026-04-23 03:00:31 -04:00
fix(db): migration 22 insert only real cols
This commit is contained in:
@@ -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;")
|
||||
|
||||
Reference in New Issue
Block a user