1 package DBIx::Class::DeploymentHandler::DatabaseToSchemaVersions;
3 use Method::Signatures::Simple;
5 # normally a VersionHandler will take
6 # a to_version and yeild an iterator of
7 # "version sets" or something like that.
9 # A "version set" is basically an arrayref
10 # of "version numbers" (which we already know
11 # is vague as is.) Typically an call to a
12 # VH w/ a db version of 1 and a "to_version"
13 # of 5 will iterate over something like this:
19 # Of course rob wants to be able to have dep
20 # management with his versions, so I *think* his
21 # would work like this:
23 # to_version = 7, db_version = 1
28 # Because 7 depended on 5, 5 was installed first;
29 # note that this potentially never released module
30 # doesn't use version pairs, instead it just yeilds
31 # versions. Version pairs are too much work for users
32 # to have to deal with in that sitation. We may
33 # actually switch to this for other versioners.
35 # The upshot of all this is that the DeploymentMethod
36 # needs to be able to take an ArrayRef[VersionNumber],
37 # instead of just a pair of VersionNumber.
40 isa => 'DBIx::Class::Schema',
43 handles => [qw( ddl_filename schema_version )],
47 isa => 'DBIx::Class::ResultSet',
50 handles => [qw( is_installed db_version )],
53 method _build_version_rs {
54 $self->schema->set_us_up_the_bomb;
55 $self->schema->resultset('__VERSION')
58 method ordered_schema_versions {
59 ( $self->db_version, $self->schema_version)
62 __PACKAGE__->meta->make_immutable;
68 vim: ts=2 sw=2 expandtab