[Catalyst] How to save timestamps using DBIx::CLASS?

kakimoto at tpg.com.au kakimoto at tpg.com.au
Tue Mar 10 10:09:14 GMT 2009


Hi,
  I added the set_on_create =>1 , and set_on_update=>1 flags to the
Schema files generated by the DBIx::Class::Schema::Loader.

Nevertheless, each time I change something on any of the database
tables, I will have to run
the model generator (ie. "myapp_create.pl model myAppDB DBIC::Schema
myApp::Schema create=static  dbi:Pg:dbname=test_db  admin catalyst-rocks"), 
I will get an error on the model files because the checksum is no longer
matching.

Any idea around that?

thanks

K. akimoto


Quoting kakimoto at tpg.com.au:

> Hello, Kieren!
>  Thanks for that. Yeah, I was googling again after I posted the
> previous
> email and I did find DBIx::Class::TimeStamp on cpan.
> 
>   ah,
> http://search.cpan.org/perldoc?DBIx::Class::InflateColumn::DateTime
> looks interesting. Just had a glance and will check it out.
> 
> 
> Cheers!
> 
> K. akimoto.
> 
> Quoting Kieren Diment <kieren at diment.org>:
> 
> > 
> > On 03/03/2009, at 1:43 PM, kakimoto at tpg.com.au wrote:
> > 
> > >
> > > hello, everybody (simpsons doctor tone),
> > >
> > >   How to save timestamps using DBIx::CLASS in a Catalyst app?
> > >
> > 
> > http://search.cpan.org/dist/DBIx-Class-TimeStamp/
> > 
> > also
> >
> http://search.cpan.org/perldoc?DBIx::Class::InflateColumn::DateTime
> > 
> > further details in here:
> > 
> > http://search.cpan.org/perldoc?DBIx::Class::Tutorial::Part3
> > 
> 
> _______________________________________________
> List: Catalyst at lists.scsys.co.uk
> Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
> Searchable archive:
> http://www.mail-archive.com/catalyst@lists.scsys.co.uk/
> Dev site: http://dev.catalyst.perl.org/
> 
> 
> 






More information about the Catalyst mailing list