VersionHandler no longer needs access to other components, *much* cleaner tests for...
[dbsrgits/DBIx-Class-DeploymentHandler.git] / lib / DBIx / Class / DeploymentHandler / VersionHandler / ExplicitVersions.pm
index 191ac1a..fd20600 100644 (file)
@@ -5,6 +5,26 @@ use Carp 'croak';
 
 with 'DBIx::Class::DeploymentHandler::HandlesVersioning';
 
+has schema_version => (
+  isa      => 'Str',
+  is       => 'ro',
+  required => 1,
+);
+
+has database_version => (
+  isa      => 'Str',
+  is       => 'ro',
+  required => 1,
+);
+
+has to_version => ( # configuration
+  is         => 'ro',
+  lazy_build => 1, # builder comes from another role...
+                   # which is... probably not how we want it
+);
+
+sub _build_to_version { $_[0]->schema_version }
+
 has ordered_versions => (
   is       => 'ro',
   isa      => 'ArrayRef',