[Catalyst-commits] r13244 -
Catalyst-Manual/5.80/trunk/lib/Catalyst/Manual/Tutorial
caelum at dev.catalyst.perl.org
caelum at dev.catalyst.perl.org
Thu May 13 12:57:20 GMT 2010
Author: caelum
Date: 2010-05-13 13:57:20 +0100 (Thu, 13 May 2010)
New Revision: 13244
Modified:
Catalyst-Manual/5.80/trunk/lib/Catalyst/Manual/Tutorial/04_BasicCRUD.pod
Log:
change created/updated columns to type "timestamp"
Modified: Catalyst-Manual/5.80/trunk/lib/Catalyst/Manual/Tutorial/04_BasicCRUD.pod
===================================================================
--- Catalyst-Manual/5.80/trunk/lib/Catalyst/Manual/Tutorial/04_BasicCRUD.pod 2010-05-13 12:56:04 UTC (rev 13243)
+++ Catalyst-Manual/5.80/trunk/lib/Catalyst/Manual/Tutorial/04_BasicCRUD.pod 2010-05-13 12:57:20 UTC (rev 13244)
@@ -938,8 +938,8 @@
each book was added and when each book is updated:
$ sqlite3 myapp.db
- sqlite> ALTER TABLE book ADD created INTEGER;
- sqlite> ALTER TABLE book ADD updated INTEGER;
+ sqlite> ALTER TABLE book ADD created TIMESTAMP;
+ sqlite> ALTER TABLE book ADD updated TIMESTAMP;
sqlite> UPDATE book SET created = DATETIME('NOW'), updated = DATETIME('NOW');
sqlite> SELECT * FROM book;
1|CCSP SNRS Exam Certification Guide|5|2010-02-16 04:15:45|2010-02-16 04:15:45
@@ -990,9 +990,9 @@
#
__PACKAGE__->add_columns(
"created",
- { data_type => 'datetime', set_on_create => 1 },
+ { data_type => 'timestamp', set_on_create => 1 },
"updated",
- { data_type => 'datetime', set_on_create => 1, set_on_update => 1 },
+ { data_type => 'timestamp', set_on_create => 1, set_on_update => 1 },
);
This will override the definition for these fields that Schema::Loader
More information about the Catalyst-commits
mailing list