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