projects
/
dbsrgits/DBIx-Class-DeploymentHandler.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
(parent:
be140a5
)
disallow undef in versions
Arthur Axel 'fREW' Schmidt [Tue, 18 May 2010 03:57:40 +0000 (22:57 -0500)]
Changes
patch
|
blob
|
blame
|
history
lib/DBIx/Class/DeploymentHandler/Dad.pm
patch
|
blob
|
blame
|
history
lib/DBIx/Class/DeploymentHandler/DeployMethod/SQL/Translator.pm
patch
|
blob
|
blame
|
history
lib/DBIx/Class/DeploymentHandler/VersionHandler/DatabaseToSchemaVersions.pm
patch
|
blob
|
blame
|
history
lib/DBIx/Class/DeploymentHandler/VersionHandler/ExplicitVersions.pm
patch
|
blob
|
blame
|
history
diff --git
a/Changes
b/Changes
index
70e0d07
..
e87649d
100644
(file)
--- a/
Changes
+++ b/
Changes
@@
-1,6
+1,7
@@
Revision history for {{$dist->name}}
{{$NEXT}}
+ - stricter validation (no undef) on versions to prevent weird surprises
- change method args to named args
- document method args
- preconnect should not connect to the database
diff --git
a/lib/DBIx/Class/DeploymentHandler/Dad.pm
b/lib/DBIx/Class/DeploymentHandler/Dad.pm
index
92bbb93
..
d816acd
100644
(file)
--- a/
lib/DBIx/Class/DeploymentHandler/Dad.pm
+++ b/
lib/DBIx/Class/DeploymentHandler/Dad.pm
@@
-21,6
+21,7
@@
has backup_directory => (
has to_version => (
is => 'ro',
+ isa => 'Str',
lazy_build => 1,
);
@@
-28,6
+29,7
@@
sub _build_to_version { $_[0]->schema_version }
has schema_version => (
is => 'ro',
+ isa => 'Str',
lazy_build => 1,
);
diff --git
a/lib/DBIx/Class/DeploymentHandler/DeployMethod/SQL/Translator.pm
b/lib/DBIx/Class/DeploymentHandler/DeployMethod/SQL/Translator.pm
index
0d232fd
..
b1a2c01
100644
(file)
--- a/
lib/DBIx/Class/DeploymentHandler/DeployMethod/SQL/Translator.pm
+++ b/
lib/DBIx/Class/DeploymentHandler/DeployMethod/SQL/Translator.pm
@@
-65,6
+65,7
@@
has txn_wrap => (
has schema_version => (
is => 'ro',
+ isa => 'Str',
lazy_build => 1,
);
diff --git
a/lib/DBIx/Class/DeploymentHandler/VersionHandler/DatabaseToSchemaVersions.pm
b/lib/DBIx/Class/DeploymentHandler/VersionHandler/DatabaseToSchemaVersions.pm
index
1762553
..
de34af0
100644
(file)
--- a/
lib/DBIx/Class/DeploymentHandler/VersionHandler/DatabaseToSchemaVersions.pm
+++ b/
lib/DBIx/Class/DeploymentHandler/VersionHandler/DatabaseToSchemaVersions.pm
@@
-21,8
+21,8
@@
has database_version => (
has to_version => ( # configuration
is => 'ro',
- lazy_build => 1, # builder comes from another role...
- # which is... probably not how we want it
+ isa => 'Str',
+ lazy_build => 1,
);
sub _build_to_version { $_[0]->schema_version }
diff --git
a/lib/DBIx/Class/DeploymentHandler/VersionHandler/ExplicitVersions.pm
b/lib/DBIx/Class/DeploymentHandler/VersionHandler/ExplicitVersions.pm
index
0781c43
..
625e2f6
100644
(file)
--- a/
lib/DBIx/Class/DeploymentHandler/VersionHandler/ExplicitVersions.pm
+++ b/
lib/DBIx/Class/DeploymentHandler/VersionHandler/ExplicitVersions.pm
@@
-21,6
+21,7
@@
has database_version => (
has to_version => (
is => 'ro',
+ isa => 'Str',
lazy_build => 1,
);