VersionHandler no longer needs access to other components, *much* cleaner tests for...
[dbsrgits/DBIx-Class-DeploymentHandler.git] / lib / DBIx / Class / DeploymentHandler / VersionHandler / DatabaseToSchemaVersions.pm
index c02d52f..7be88f4 100644 (file)
@@ -4,6 +4,26 @@ use Method::Signatures::Simple;
 
 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 once => (
   is      => 'rw',
   isa     => 'Bool',