Commit | Line | Data |
c9d2e0a2 |
1 | package DBICVersion::Table; |
2 | |
3 | use base 'DBIx::Class'; |
4 | use strict; |
5 | use warnings; |
6 | |
7 | __PACKAGE__->load_components(qw/ Core/); |
8 | __PACKAGE__->table('TestVersion'); |
9 | |
10 | __PACKAGE__->add_columns |
11 | ( 'Version' => { |
12 | 'data_type' => 'INTEGER', |
13 | 'is_auto_increment' => 1, |
14 | 'default_value' => undef, |
15 | 'is_foreign_key' => 0, |
16 | 'is_nullable' => 0, |
17 | 'size' => '' |
18 | }, |
19 | 'VersionName' => { |
20 | 'data_type' => 'VARCHAR', |
21 | 'is_auto_increment' => 0, |
22 | 'default_value' => undef, |
23 | 'is_foreign_key' => 0, |
f925f7cb |
24 | 'is_nullable' => 0, |
25 | 'size' => '10' |
26 | }, |
1d48fcff |
27 | 'NewVersionName' => { |
f925f7cb |
28 | 'data_type' => 'VARCHAR', |
29 | 'is_auto_increment' => 0, |
30 | 'default_value' => undef, |
31 | 'is_foreign_key' => 0, |
c9d2e0a2 |
32 | 'is_nullable' => 1, |
33 | 'size' => '20' |
f925f7cb |
34 | } |
c9d2e0a2 |
35 | ); |
36 | |
37 | __PACKAGE__->set_primary_key('Version'); |
38 | |
39 | package DBICVersion::Schema; |
40 | use base 'DBIx::Class::Schema'; |
41 | use strict; |
42 | use warnings; |
43 | |
44 | our $VERSION = '2.0'; |
45 | |
46 | __PACKAGE__->register_class('Table', 'DBICVersion::Table'); |
47 | __PACKAGE__->load_components('+DBIx::Class::Schema::Versioned'); |
8795fefb |
48 | __PACKAGE__->upgrade_directory('t/var/'); |
49 | __PACKAGE__->backup_directory('t/var/backup/'); |
c9d2e0a2 |
50 | |
8795fefb |
51 | #sub upgrade_directory |
52 | #{ |
53 | # return 't/var/'; |
54 | #} |
c9d2e0a2 |
55 | |
56 | 1; |