the new fields:
$ script/myapp_create.pl model DB DBIC::Schema MyApp::Schema \
- create=static component=TimeStamp dbi:SQLite:myapp.db \
+ create=static components=TimeStamp dbi:SQLite:myapp.db \
on_connect_do="PRAGMA foreign_keys = ON"
exists "/home/catalyst/dev/MyApp/script/../lib/MyApp/Model"
exists "/home/catalyst/dev/MyApp/script/../t"
for us:
$ script/myapp_create.pl model DB DBIC::Schema MyApp::Schema \
- create=static component=TimeStamp dbi:SQLite:myapp.db \
+ create=static components=TimeStamp dbi:SQLite:myapp.db \
on_connect_do="PRAGMA foreign_keys = ON"
exists "/home/catalyst/dev/MyApp/script/../lib/MyApp/Model"
exists "/home/catalyst/dev/MyApp/script/../t"
4, but add C<,PassphraseColumn> to the C<components> argument:
$ script/myapp_create.pl model DB DBIC::Schema MyApp::Schema \
- create=static component=TimeStamp,PassphraseColumn dbi:SQLite:myapp.db \
+ create=static components=TimeStamp,PassphraseColumn dbi:SQLite:myapp.db \
on_connect_do="PRAGMA foreign_keys = ON"
If you then open one of the Result Classes, you will see that it
$ rm lib/MyApp/Model/DB.pm # Delete just in case already there
$ script/myapp_create.pl model DB DBIC::Schema MyApp::Schema \
- create=static component=TimeStamp,PassphraseColumn \
+ create=static components=TimeStamp,PassphraseColumn \
'dbi:Pg:dbname=catappdb' 'catappuser' 'catalyst' '{ AutoCommit => 1 }'
=back
Re-generate the model using the Catalyst "_create.pl" script:
$ script/myapp_create.pl model DB DBIC::Schema MyApp::Schema \
- create=static component=TimeStamp,PassphraseColumn \
+ create=static components=TimeStamp,PassphraseColumn \
'dbi:Pg:dbname=catappdb' 'catappuser' 'catalyst' '{ AutoCommit => 1 }'
Regenerate the model using the Catalyst "_create.pl" script:
script/myapp_create.pl model DB DBIC::Schema MyApp::Schema create=static \
- component=TimeStamp,PassphraseColumn dbi:mysql:myapp 'tutorial' 'yourpassword' '{ AutoCommit => 1 }'
+ components=TimeStamp,PassphraseColumn dbi:mysql:myapp 'tutorial' 'yourpassword' '{ AutoCommit => 1 }'
=back