Commit | Line | Data |
f0f14c64 |
1 | package DBIx::Class::Schema::Journal::DB::ChangeSet; |
2 | |
34b144a0 |
3 | use base 'DBIx::Class::Core'; |
f0f14c64 |
4 | |
34b144a0 |
5 | __PACKAGE__->load_components(qw/InflateColumn::DateTime/); |
f0f14c64 |
6 | __PACKAGE__->table('changeset'); |
7 | |
8 | __PACKAGE__->add_columns( |
34b144a0 |
9 | ID => { |
10 | data_type => 'integer', |
11 | is_auto_increment => 1, |
12 | is_primary_key => 1, |
13 | is_nullable => 0, |
14 | }, |
15 | user_id => { |
16 | data_type => 'integer', |
17 | is_nullable => 1, |
18 | is_foreign_key => 1, |
19 | }, |
20 | set_date => { |
21 | data_type => 'timestamp', |
22 | is_nullable => 0, |
23 | }, |
24 | session_id => { |
25 | data_type => 'varchar', |
26 | size => 255, |
27 | is_nullable => 1, |
28 | }, |
29 | ); |
f0f14c64 |
30 | |
cf628f4c |
31 | sub new { |
32 | my $self = shift->next::method(@_); |
34b144a0 |
33 | # I think we should not do the following and |
34 | # instead use DBIx::Class::TimeStamp. If I |
35 | # can think of a good way (passing a version on |
36 | # import?) to do it and retain backcompat I will. |
37 | # |
38 | # --fREW, 01-27-2010 |
9a52f4b4 |
39 | $self->set_date(gmtime); |
cf628f4c |
40 | return $self; |
41 | } |
42 | |
0192d267 |
43 | __PACKAGE__->set_primary_key('ID'); |
f0f14c64 |
44 | |
45 | 1; |