Commit | Line | Data |
8273e845 |
1 | package # hide from PAUSE |
c6d74d3e |
2 | Film; |
ea2e61bf |
3 | |
4a233f30 |
4 | use warnings; |
ea2e61bf |
5 | use strict; |
6 | |
4a233f30 |
7 | use base 'DBIC::Test::SQLite'; |
8 | |
ea2e61bf |
9 | __PACKAGE__->set_table('Movies'); |
10 | __PACKAGE__->columns('Primary', 'Title'); |
11 | __PACKAGE__->columns('Essential', qw( Title )); |
12 | __PACKAGE__->columns('Directors', qw( Director CoDirector )); |
13 | __PACKAGE__->columns('Other', qw( Rating NumExplodingSheep HasVomit )); |
14 | |
7305f6f9 |
15 | # Disables the implicit autoinc-on-non-supplied-pk behavior |
16 | # (and the warning that goes with it) |
17 | # This is the same behavior as it was pre 0.082900 |
18 | __PACKAGE__->column_info('title')->{is_auto_increment} = 0; |
19 | |
ea2e61bf |
20 | sub create_sql { |
6a3bf251 |
21 | return qq{ |
22 | title VARCHAR(255), |
23 | director VARCHAR(80), |
24 | codirector VARCHAR(80), |
25 | rating CHAR(5), |
26 | numexplodingsheep INTEGER, |
27 | hasvomit CHAR(1) |
ea2e61bf |
28 | } |
29 | } |
30 | |
8273e845 |
31 | sub create_test_film { |
6a3bf251 |
32 | return shift->create({ |
33 | Title => 'Bad Taste', |
34 | Director => 'Peter Jackson', |
35 | Rating => 'R', |
36 | NumExplodingSheep => 1, |
37 | }); |
ea2e61bf |
38 | } |
39 | |
40 | package DeletingFilm; |
41 | |
42 | use base 'Film'; |
43 | sub DESTROY { shift->delete } |
44 | |
45 | 1; |
46 | |