Commit | Line | Data |
30c3818a |
1 | package DBIx::Class::DeploymentHandler::VersionStorage::Standard::VersionResult; |
8ba006d6 |
2 | |
0fa93773 |
3 | # ABSTRACT: The typical way to store versions in the database |
4 | |
8ba006d6 |
5 | use strict; |
6 | use warnings; |
7 | |
12fdd461 |
8 | use parent 'DBIx::Class::Core'; |
8ba006d6 |
9 | |
10 | __PACKAGE__->table('dbix_class_deploymenthandler_versions'); |
11 | |
12 | __PACKAGE__->add_columns ( |
3d3e2f00 |
13 | id => { |
ae17010c |
14 | data_type => 'int', |
15 | is_auto_increment => 1, |
16 | }, |
17 | version => { |
18 | data_type => 'varchar', |
7ea1d535 |
19 | # size needs to be at least |
20 | # 40 to support SHA1 versions |
21 | size => '50' |
ae17010c |
22 | }, |
23 | ddl => { |
24 | data_type => 'text', |
25 | is_nullable => 1, |
26 | }, |
27 | upgrade_sql => { |
28 | data_type => 'text', |
29 | is_nullable => 1, |
30 | }, |
8ba006d6 |
31 | ); |
32 | |
3d3e2f00 |
33 | __PACKAGE__->set_primary_key('id'); |
8ba006d6 |
34 | __PACKAGE__->add_unique_constraint(['version']); |
30c3818a |
35 | __PACKAGE__->resultset_class('DBIx::Class::DeploymentHandler::VersionStorage::Standard::VersionResultSet'); |
8ba006d6 |
36 | |
37 | 1; |
e52174e3 |
38 | |
39 | # vim: ts=2 sw=2 expandtab |
40 | |
41 | __END__ |
42 | |