From: hkclark Date: Tue, 30 Aug 2011 22:49:34 +0000 (-0400) Subject: Update for VM X-Git-Tag: 5.9003~25^2~34 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=catagits%2FCatalyst-Manual.git;a=commitdiff_plain;h=d5d7ee980cf02b9a519bc006a0f85b965d028ee2;hp=01df1cc9a0dbe37b417f64b8f4f4bd0555a99d19 Update for VM --- diff --git a/lib/Catalyst/Manual/Tutorial/04_BasicCRUD.pod b/lib/Catalyst/Manual/Tutorial/04_BasicCRUD.pod index 43c5968..2322b3e 100644 --- a/lib/Catalyst/Manual/Tutorial/04_BasicCRUD.pod +++ b/lib/Catalyst/Manual/Tutorial/04_BasicCRUD.pod @@ -787,8 +787,6 @@ cascading delete operation via the DBIC_TRACE output: SELECT me.id, me.title, me.rating FROM book me WHERE ( ( me.id = ? ) ): '6' DELETE FROM book WHERE ( id = ? ): '6' - SELECT me.book_id, me.author_id FROM book_author me WHERE ( me.book_id = ? ): '6' - DELETE FROM book_author WHERE ( author_id = ? AND book_id = ? ): '4', '6' =head2 Fixing a Dangerous URL @@ -943,6 +941,15 @@ book was added and when each book is updated: sqlite> .quit $ +Here are the commands without the surrounding sqlite3 prompt and output +in case you want to cut and paste them as a single block (but still +start sqlite3 before you paste these in): + + ALTER TABLE book ADD created TIMESTAMP; + ALTER TABLE book ADD updated TIMESTAMP; + UPDATE book SET created = DATETIME('NOW'), updated = DATETIME('NOW'); + SELECT * FROM book; + This will modify the C table to include the two new fields and populate those fields with the current time. @@ -971,11 +978,11 @@ call to C. However, also notice that the C relationships we manually added below the "C<# DO NOT MODIFY...>" line were automatically preserved. -While we have this file open, let's update it with some additional -information to have DBIC automatically handle the updating of these two -fields for us. Insert the following code at the bottom of the file (it -B be B the "C<# DO NOT MODIFY...>" line and B the -C<1;> on the last line): +While we C open, let's update it with +some additional information to have DBIC automatically handle the +updating of these two fields for us. Insert the following code at the +bottom of the file (it B be B the "C<# DO NOT MODIFY...>" +line and B the C<1;> on the last line): # # Enable automatic date handling