Loading README.md +1 −1 Original line number Diff line number Diff line Loading @@ -68,7 +68,7 @@ or not. ``` git pull chmod -R a+rX . # only needed if travelynx is running under a different user if perl index.pl database has-current-schema | grep -Fq yes; then if perl index.pl database has-current-schema; then systemctl reload travelynx else systemctl stop travelynx Loading lib/Travelynx/Command/database.pm +5 −0 Original line number Diff line number Diff line Loading @@ -110,6 +110,7 @@ my @migrations = ( sub run { my ( $self, $command ) = @_; my $exit_status = 0; my $dbh = $self->app->dbh; Loading @@ -120,6 +121,7 @@ sub run { } else { $dbh->rollback; $exit_status = 1; } } elsif ( $command eq 'migrate' ) { Loading @@ -134,6 +136,7 @@ sub run { if ( not $migrations[$i]($dbh) ) { say "Aborting migration; rollback to v${schema_version}"; $dbh->rollback; $exit_status = 1; last; } } Loading @@ -147,6 +150,7 @@ sub run { } else { say "no"; $exit_status = 1; } } else { Loading @@ -155,6 +159,7 @@ sub run { $dbh->disconnect; exit($exit_status); } 1; Loading Loading
README.md +1 −1 Original line number Diff line number Diff line Loading @@ -68,7 +68,7 @@ or not. ``` git pull chmod -R a+rX . # only needed if travelynx is running under a different user if perl index.pl database has-current-schema | grep -Fq yes; then if perl index.pl database has-current-schema; then systemctl reload travelynx else systemctl stop travelynx Loading
lib/Travelynx/Command/database.pm +5 −0 Original line number Diff line number Diff line Loading @@ -110,6 +110,7 @@ my @migrations = ( sub run { my ( $self, $command ) = @_; my $exit_status = 0; my $dbh = $self->app->dbh; Loading @@ -120,6 +121,7 @@ sub run { } else { $dbh->rollback; $exit_status = 1; } } elsif ( $command eq 'migrate' ) { Loading @@ -134,6 +136,7 @@ sub run { if ( not $migrations[$i]($dbh) ) { say "Aborting migration; rollback to v${schema_version}"; $dbh->rollback; $exit_status = 1; last; } } Loading @@ -147,6 +150,7 @@ sub run { } else { say "no"; $exit_status = 1; } } else { Loading @@ -155,6 +159,7 @@ sub run { $dbh->disconnect; exit($exit_status); } 1; Loading