summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--database.h2
-rw-r--r--litterbox.c9
2 files changed, 3 insertions, 8 deletions
diff --git a/database.h b/database.h
index c852e11..878a5f6 100644
--- a/database.h
+++ b/database.h
@@ -123,7 +123,7 @@ static inline void dbFind(char *path, int flags) {
 		dataDirs += len;
 		if (*dataDirs) dataDirs++;
 	}
-	errx(EX_NOINPUT, "database not found");
+	errx(EX_NOINPUT, "database not found; initialize it with litterbox -i");
 }
 
 static struct Persist {
diff --git a/litterbox.c b/litterbox.c
index 632549a..808b565 100644
--- a/litterbox.c
+++ b/litterbox.c
@@ -793,17 +793,12 @@ int main(int argc, char *argv[]) {
 		dbInit();
 		return EX_OK;
 	}
-	if (migrate) {
-		dbMigrate();
-		return EX_OK;
-	}
 	if (backup) {
 		dbBackup(backup);
 		return EX_OK;
 	}
-	if (dbVersion() != DatabaseVersion) {
-		errx(EX_CONFIG, "database out of date; migrate with -m");
-	}
+	dbMigrate();
+	if (migrate) return EX_OK;
 	createJoins();
 
 	if (!host) errx(EX_USAGE, "host required");
td>Update Care with time-to-ID and piercingsJune McEnroe 2022-07-26Add -w to upJune McEnroe 2022-07-13Set push.autoSetupRemoteJune McEnroe 2022-07-08Remove TOURJune McEnroe 2022-07-03Add The Bone Shard EmperorJune McEnroe 2022-06-25Bump xterm font size to 12June McEnroe 2022-06-10Handle subshells (and functions) inside substitutionsJune McEnroe 2022-06-10Switch to jorts Install scriptJune McEnroe 2022-06-08Indicate if still reading or no resultsJune McEnroe 2022-06-08Add Maiden, Mother, CroneJune McEnroe 2022-06-05FIRST SHOW IN 2.5 YEARS BABEY!!!June McEnroe 2022-06-03Set line number on File linesJune McEnroe 2022-06-03Stop polling stdin after EOFJune McEnroe 2022-06-02Set TABSIZE=4June McEnroe 2022-06-02Do basic match highlightingJune McEnroe 2022-06-02Clean up parsing a littleJune McEnroe 2022-06-02Don't duplicate path stringJune McEnroe 2022-06-02Use stderr instead of /dev/tty, realloc buffer if lines too longJune McEnroe 2022-06-02Add initial working version of qfJune McEnroe 2022-05-29Set prompt for okshJune McEnroe