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