Patches: Browse | Submit New | Admin

[#8724] create_versioned_table sometimes has an outdated view of what the model's table actually looks like

Date:
2007-02-17 12:58
Priority:
3
Submitted By:
Graeme Mathieson (mathie)
Assigned To:
Nobody (None)
Category:
None
State:
Open
Summary:
create_versioned_table sometimes has an outdated view of what the model's table actually looks like

Detailed description
I often run drop_versioned_table and create_versioned_table to reset a table's versions while in development, as part
of a migration which does other things too.  If other columns are added and removed, sometimes the acts_as_versioned
model can lose track of what columns it actually has before the create_versioned_table method is called, so it winds
up not creating the correct columns in the versioned table.  Attached is a patch which simply calls
self.reset_column_information in create_versioned_table to make sure the column information is back in sync.

Add A Comment: Notepad

Please login


Followup

No Followups Have Been Posted

Attached Files:

Name Description Download
aav_reset_column_information.diff reset column information patch. Download

Changes:

Field Old Value Date By
File Added1249: aav_reset_column_information.diff2007-02-17 12:58mathie