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, |
23 | 'is_nullable' => 0, |
24 | 'size' => '10' |
25 | }, |
26 | ); |
27 | |
28 | __PACKAGE__->set_primary_key('Version'); |
29 | |
30 | package DBICVersion::Schema; |
27a701f9 |
31 | use base 'DBICTest::BaseSchema'; |
c9d2e0a2 |
32 | use strict; |
33 | use warnings; |
34 | |
35 | our $VERSION = '1.0'; |
36 | |
37 | __PACKAGE__->register_class('Table', 'DBICVersion::Table'); |
38 | __PACKAGE__->load_components('+DBIx::Class::Schema::Versioned'); |
8d6b1478 |
39 | __PACKAGE__->upgrade_directory("t/var/versioning_ddl-$$"); |
c9d2e0a2 |
40 | |
d2bc7045 |
41 | sub ordered_schema_versions { |
42 | return('1.0','2.0','3.0'); |
43 | } |
44 | |
c9d2e0a2 |
45 | 1; |