Commit | Line | Data |
445e5e31 |
1 | package DBICTest::Schema::Event; |
2 | |
cb9fdccb |
3 | use strict; |
4 | use warnings; |
4a233f30 |
5 | |
660cf1be |
6 | use base qw/DBICTest::BaseResult/; |
445e5e31 |
7 | |
ff657a43 |
8 | __PACKAGE__->load_components(qw/InflateColumn::DateTime/); |
cb9fdccb |
9 | |
10 | __PACKAGE__->table('event'); |
11 | |
12 | __PACKAGE__->add_columns( |
13 | id => { data_type => 'integer', is_auto_increment => 1 }, |
c5827074 |
14 | |
b30f1a32 |
15 | # this MUST be 'date' for the Firebird and SQLAnywhere tests |
24f5cbcb |
16 | starts_at => { data_type => 'date', datetime_undef_if_invalid => 1 }, |
c5827074 |
17 | |
a97fe7e0 |
18 | created_on => { data_type => 'timestamp' }, |
157ce0cf |
19 | varchar_date => { data_type => 'varchar', size => 20, is_nullable => 1 }, |
20 | varchar_datetime => { data_type => 'varchar', size => 20, is_nullable => 1 }, |
a0dd8679 |
21 | skip_inflation => { data_type => 'datetime', inflate_datetime => 0, is_nullable => 1 }, |
65b386df |
22 | ts_without_tz => { data_type => 'datetime', is_nullable => 1 }, # used in EventTZPg |
cb9fdccb |
23 | ); |
24 | |
25 | __PACKAGE__->set_primary_key('id'); |
26 | |
157ce0cf |
27 | # Test add_columns '+colname' to augment a column definition. |
28 | __PACKAGE__->add_columns( |
29 | '+varchar_date' => { |
30 | inflate_date => 1, |
31 | }, |
32 | '+varchar_datetime' => { |
33 | inflate_datetime => 1, |
34 | }, |
35 | ); |
36 | |
cb9fdccb |
37 | 1; |