Trailing WS crusade - got to save them bits
[dbsrgits/DBIx-Class.git] / t / cdbi / testlib / Film.pm
CommitLineData
8273e845 1package # hide from PAUSE
c6d74d3e 2 Film;
ea2e61bf 3
97d61088 4use base 'DBIC::Test::SQLite';
ea2e61bf 5use strict;
6
7__PACKAGE__->set_table('Movies');
8__PACKAGE__->columns('Primary', 'Title');
9__PACKAGE__->columns('Essential', qw( Title ));
10__PACKAGE__->columns('Directors', qw( Director CoDirector ));
11__PACKAGE__->columns('Other', qw( Rating NumExplodingSheep HasVomit ));
12
13sub create_sql {
6a3bf251 14 return qq{
15 title VARCHAR(255),
16 director VARCHAR(80),
17 codirector VARCHAR(80),
18 rating CHAR(5),
19 numexplodingsheep INTEGER,
20 hasvomit CHAR(1)
ea2e61bf 21 }
22}
23
8273e845 24sub create_test_film {
6a3bf251 25 return shift->create({
26 Title => 'Bad Taste',
27 Director => 'Peter Jackson',
28 Rating => 'R',
29 NumExplodingSheep => 1,
30 });
ea2e61bf 31}
32
33package DeletingFilm;
34
35use base 'Film';
36sub DESTROY { shift->delete }
37
381;
39