Ticket #351 (closed defect: duplicate)

Opened 6 years ago

Last modified 6 years ago

south.db.sqlite3.DatabaseOperations._fields not updated after an add_column

Reported by: olivier.mansion@… Owned by: andrew
Priority: major Milestone: 0.7
Component: databaseapi Version: 0.6.2
Keywords: Cc:


When many migrations are performed by the migrate command, in some cases, column added with add_column can disappear.

Here is an example of migration :

First migration:
A delete_column on table T (it loads DatabaseOperations?._fields)

Second migration :
An add_column on table T (at the very end, DatabaseOperations?._fields is not updated with this new column as _populate_current_structure not called)

Third migration :
An delete_column on table T (at the very end, table is rebuilt with _fields data => field added in second migration disappears)

I've linked a project that reproduce the issue:

  • trash the database,
  • syncdb,
  • migrate,

=> OperationalError?: table app_test has no column named name3


project.tar.gz (3.1 KB) - added by anonymous 6 years ago.

Change History

Changed 6 years ago by anonymous

comment:1 Changed 6 years ago by andrew

  • Status changed from new to closed
  • Resolution set to duplicate
  • Milestone set to 0.7

Duplicate of #316 - this is fixed in trunk.

Note: See TracTickets for help on using tickets.