Fix silent failures on autoinc PK without an is_auto_increment attribute
[dbsrgits/DBIx-Class.git] / t / cdbi / testlib / ActorAlias.pm
1 package # hide from PAUSE
2     ActorAlias;
3
4 use strict;
5 use warnings;
6
7 use base 'DBIC::Test::SQLite';
8
9 __PACKAGE__->set_table( 'ActorAlias' );
10
11 __PACKAGE__->columns( Primary => 'id' );
12 __PACKAGE__->columns( All     => qw/ actor alias / );
13 __PACKAGE__->has_a( actor => 'Actor' );
14 __PACKAGE__->has_a( alias => 'Actor' );
15
16 # Disables the implicit autoinc-on-non-supplied-pk behavior
17 # (and the warning that goes with it)
18 # This is the same behavior as it was pre 0.082900
19 __PACKAGE__->column_info('id')->{is_auto_increment} = 0;
20
21 sub create_sql {
22   return qq{
23     id    INTEGER PRIMARY KEY,
24     actor INTEGER,
25     alias INTEGER
26   }
27 }
28
29 1;
30