Patches: Browse | Submit New | Admin

[#16999] Patch for decimal columns failing to maintain precision and scale in versioned tables

Date:
2008-01-10 23:49
Priority:
3
Submitted By:
James Ross (jimmyjazz)
Assigned To:
Nobody (None)
Category:
None
State:
Open
Summary:
Patch for decimal columns failing to maintain precision and scale in versioned tables

Detailed description
Currently the acts_as_versioned plugin has a problem with decimal columns in versioned tables. They lose their scale
and precision, which shows up as all decimal columns in a versioned table being integers. For example, if you have a
decimal(7,2) column that has a value of 123,45 in the original row, any versions recorded by acts_as_versioned will
be (at least on MySQL) decimal(10,0) with the value 123.

This patch addresses this issue and also enhances the unit tests to ensure it works as expected.

Add A Comment: Notepad

Please login


Followup

No Followups Have Been Posted

Attached Files:

Name Description Download
patch-acts-as-versioned-for-decimal-scale-issue.txt svn diff patch for decimal columns losing scale and precision in versioned tables Download

Changes:

Field Old Value Date By
File Added3096: patch-acts-as-versioned-for-decimal-scale-issue.txt2008-01-10 23:49jimmyjazz