a few more fixups to ExampleSchema.pod
[dbsrgits/DBIx-Class.git] / lib / DBIx / Class / Manual / ExampleSchema.pod
index 8481c64..2b7ca30 100644 (file)
@@ -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');