Monthly Archives: July 2009

Changing the type on a legacy table in ActiveRecord

I’m doing some work for a client which involves extracting some data from a legacy database and displaying it in a web interface. One of the fields in the table is the number of megabytes included in the quota. For some crazy reason this is defined as follows: CREATE TABLE quota ( bandwidth_in_included DECIMAL(8,2) ); [...]