From 8096c33c00d6e49b4d261f2016403675accafce8 Mon Sep 17 00:00:00 2001 From: Daniel Friesel Date: Sun, 7 Apr 2019 14:18:56 +0200 Subject: Add a note about updating travelynx --- lib/Travelynx/Command/database.pm | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'lib') diff --git a/lib/Travelynx/Command/database.pm b/lib/Travelynx/Command/database.pm index e501e47..7a714b1 100644 --- a/lib/Travelynx/Command/database.pm +++ b/lib/Travelynx/Command/database.pm @@ -106,6 +106,14 @@ sub run { $dbh->commit; } } + elsif ( $command eq 'has-current-schema' ) { + if ( get_schema_version($dbh) == $#migrations ) { + say "yes"; + } + else { + say "no"; + } + } else { $self->help; } @@ -120,7 +128,7 @@ __END__ =head1 SYNOPSIS - Usage: index.pl database + Usage: index.pl database Upgrades the database layout to the latest schema. -- cgit v1.2.3