Don't let this osmo-msc operate on a libdbi database

The Binary format changed when libdbi was removed. If we let osmo-msc run on an
unconverted database, the results are unpredictable, certainly undesirable.

Change-Id: I887b6a4374b1c83684f4007e9791ae58bba4e8c1
This commit is contained in:
Keith Whyte 2022-06-18 02:51:51 +01:00 committed by laforge
parent 5b06a8d6a5
commit ea62986928
1 changed files with 7 additions and 7 deletions

View File

@ -72,7 +72,7 @@ static struct db_context *g_dbc;
* DATABASE SCHEMA AND MIGRATION * DATABASE SCHEMA AND MIGRATION
***********************************************************************/ ***********************************************************************/
#define SCHEMA_REVISION "5" #define SCHEMA_REVISION "6"
enum { enum {
SCHEMA_META, SCHEMA_META,
@ -480,14 +480,14 @@ static int check_db_revision(struct db_context *dbc)
LOGP(DDB, LOGL_FATAL, "You must use osmo-msc 1.1.0 to 1.8.0 to upgrade database " LOGP(DDB, LOGL_FATAL, "You must use osmo-msc 1.1.0 to 1.8.0 to upgrade database "
"schema from '%u' to '5', sorry\n", db_rev); "schema from '%u' to '5', sorry\n", db_rev);
break; break;
#if 0
case 5: case 5:
if (update_db_revision_5()) LOGP(DDB, LOGL_FATAL, "The storage format of BINARY data in the database "
goto error; "has changed. In order to deliver any pending SMS in your database, "
"you must manually convert your database from "
/* The end of waterfall */ "'%u' to '6'. Alternatively you can use a fresh, blank database "
"with this version of osmo-msc, sorry.\n", db_rev);
return -1;
break; break;
#endif
default: default:
LOGP(DDB, LOGL_FATAL, "Invalid database schema revision '%d'.\n", db_rev); LOGP(DDB, LOGL_FATAL, "Invalid database schema revision '%d'.\n", db_rev);
return -EINVAL; return -EINVAL;