From 08806dcfa24dbb7727c63ff46aedc2ee9eff46cc Mon Sep 17 00:00:00 2001 From: Oliver Gorwits Date: Wed, 29 May 2013 19:46:42 +0100 Subject: [PATCH] get_db_version will be 0 at first deploy --- Netdisco/bin/netdisco-db-deploy | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Netdisco/bin/netdisco-db-deploy b/Netdisco/bin/netdisco-db-deploy index db95fbb5..3a41d017 100755 --- a/Netdisco/bin/netdisco-db-deploy +++ b/Netdisco/bin/netdisco-db-deploy @@ -77,7 +77,8 @@ try { }; # upgrade from whatever dbix_class_schema_versions says, to $VERSION -my $db_version = $schema->get_db_version; +# except that get_db_version will be 0 at first deploy +my $db_version = ($schema->get_db_version || 1); my $target_version = $schema->schema_version; # one step at a time, in case user has applied local changes already