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