July 2009 Archives
Update 2010-03-10: The bug this works around has been fixed as of y to use this hack unless you are stuck with an old DBIx::Class.
There's an interesting interaction between PostgreSQL, DBIx::Class::Schema::Loader and DBIx::Class:InflateColumn::DateTime.
When you define a column to be of type TIMESTAMP, it actually becomes a TIMESTAMP WITHOUT TIME ZONE. DBIx::Class::Schema::Loader just copies this into the DBIC data_type field without translation, and so when DBIx::Class::InflateColumn::DateTime comes along, it doesn't realise it's a time value and doesn't bother to add the inflater.
This awful kludge hooks register_column and changes the data_type field to "timestamp", thus making it all work as expected.
(code after the cut)
There's an interesting interaction between PostgreSQL, DBIx::Class::Schema::Loader and DBIx::Class:InflateColumn::DateTime.
When you define a column to be of type TIMESTAMP, it actually becomes a TIMESTAMP WITHOUT TIME ZONE. DBIx::Class::Schema::Loader just copies this into the DBIC data_type field without translation, and so when DBIx::Class::InflateColumn::DateTime comes along, it doesn't realise it's a time value and doesn't bother to add the inflater.
This awful kludge hooks register_column and changes the data_type field to "timestamp", thus making it all work as expected.
(code after the cut)
Continue reading DBIC note to self....
Spring-cleaning 2009--shush, I know it's summer--and it's time to dispose of more tat. Today's unwanted item is a Sherwood DD-1030 double tape deck, and fifty-odd tapes. Relive the era before MP3s with wow, flutter and dr-pou-s.
The binmen come on Monday, so it'll need claming before then.
The binmen come on Monday, so it'll need claming before then.