X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=lib%2FDBIx%2FClass%2FManual%2FExampleSchema.pod;h=2b7ca30a0b944f62ac5fed3349a6933ba34daa80;hb=a924ba798dc4f57281a03b8a08d91b1de048e3e4;hp=8481c64cb8387813323501bd15f85a1f4e7523d9;hpb=17399797ba1a8eed2469e6460425b28b132a601f;p=dbsrgits%2FDBIx-Class.git 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');