fix(db): migration 22 insert only real cols

This commit is contained in:
psychedelicious
2025-10-08 16:54:12 +11:00
parent 55d7d2e396
commit f57ee304bc

View File

@@ -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;")