Update year on copyright
[catagits/Catalyst-Manual.git] / lib / Catalyst / Manual / Tutorial / 04_BasicCRUD.pod
index 490eb74..f7f5f1b 100644 (file)
@@ -938,8 +938,8 @@ Let's add two columns to our existing C<books> table to track when
 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 @@ B<above> the C<1;> on the last line):
     #
     __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 
@@ -1384,5 +1384,5 @@ Please report any errors, issues or suggestions to the author.  The
 most recent version of the Catalyst Tutorial can be found at
 L<http://dev.catalyst.perl.org/repos/Catalyst/Catalyst-Manual/5.80/trunk/lib/Catalyst/Manual/Tutorial/>.
 
-Copyright 2006-2008, Kennedy Clark, under Creative Commons License
+Copyright 2006-2010, Kennedy Clark, under Creative Commons License
 (L<http://creativecommons.org/licenses/by-sa/3.0/us/>).