From: Brandon L. Black Date: Sat, 4 Mar 2006 00:12:36 +0000 (+0000) Subject: a few more fixups to ExampleSchema.pod X-Git-Tag: v0.06000~65 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=a924ba798dc4f57281a03b8a08d91b1de048e3e4;p=dbsrgits%2FDBIx-Class.git a few more fixups to ExampleSchema.pod --- diff --git a/lib/DBIx/Class/Manual/ExampleSchema.pod b/lib/DBIx/Class/Manual/ExampleSchema.pod index 8481c64..2b7ca30 100644 --- a/lib/DBIx/Class/Manual/ExampleSchema.pod +++ b/lib/DBIx/Class/Manual/ExampleSchema.pod @@ -46,12 +46,12 @@ Save the following into a example.sql CREATE TABLE cd ( cdid INTEGER PRIMARY KEY, - artist INTEGER NOT NULL REFERENCES artist(id), + artist INTEGER NOT NULL REFERENCES artist(artistid), title TEXT NOT NULL); CREATE TABLE track ( trackid INTEGER PRIMARY KEY, - cd INTEGER NOT NULL REFERENCES cd(id), + cd INTEGER NOT NULL REFERENCES cd(cdid), title TEXT NOT NULL) ; and create the sqlite database file: @@ -125,7 +125,7 @@ insertdb.pl use DB::Main; use strict; - my $schema = DB::Main->connect('dbi:SQLite:dbic_test.db'); + my $schema = DB::Main->connect('dbi:SQLite:example.db'); # here's some of the sql that is going to be generated by the schema # INSERT INTO artist VALUES (NULL,'Michael Jackson'); @@ -189,7 +189,7 @@ testdb.pl: use DB::Main; use strict; - my $schema = DB::Main->connect('dbi:mysql:cdtestdb', 'testuser', 'testpass'); + my $schema = DB::Main->connect('dbi:SQLite:example.db'); get_tracks_by_cd('Bad'); get_tracks_by_artist('Michael Jackson');