whitespace, use base Core, and an idea on backcompat
[dbsrgits/DBIx-Class-Journal.git] / lib / DBIx / Class / Schema / Journal / DB / ChangeLog.pm
CommitLineData
fd45c476 1package DBIx::Class::Schema::Journal::DB::ChangeLog;
f0f14c64 2
34b144a0 3use base 'DBIx::Class::Core';
f0f14c64 4
34b144a0 5__PACKAGE__->load_components(qw/Ordered/);
30a4f241 6__PACKAGE__->table('changelog');
f0f14c64 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 changeset_id => {
16 data_type => 'integer',
17 is_nullable => 0,
18 is_foreign_key => 1,
19 },
20 order_in => {
21 data_type => 'integer',
22 is_nullable => 0,
23 },
24);
f0f14c64 25
26
0192d267 27__PACKAGE__->set_primary_key('ID');
d27ed438 28__PACKAGE__->add_unique_constraint('setorder', [ qw/changeset_id order_in/ ]);
f0f14c64 29__PACKAGE__->belongs_to('changeset', 'DBIx::Class::Schema::Journal::DB::ChangeSet', 'changeset_id');
30
8092c4ed 31 __PACKAGE__->position_column('order_in');
32 __PACKAGE__->grouping_column('changeset_id');
34b144a0 33
f0f14c64 341;