From 7f5b7eea1641d3dd004f56ec6763bb4dc7f39499 Mon Sep 17 00:00:00 2001 From: Andris Reinman Date: Thu, 21 Apr 2016 11:08:59 +0300 Subject: [PATCH] Removed initial schema check --- config/default.toml | 2 -- index.js | 3 ++- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/config/default.toml b/config/default.toml index ba2828f5..3c6f8af8 100644 --- a/config/default.toml +++ b/config/default.toml @@ -34,8 +34,6 @@ database="mailtrain" charset="utf8mb4" # enter path for mysql command line application command="mysql" -# required database schema version -schema_version=1 [redis] # enable to use Redis session cache or disable if Redis is not installed diff --git a/index.js b/index.js index 65d07f93..651ade3d 100644 --- a/index.js +++ b/index.js @@ -40,7 +40,8 @@ settings.list(['db_schema_version'], (err, configItems) => { } let dbSchemaVersion = Number(configItems.dbSchemaVersion) || 0; - if (dbSchemaVersion < config.mysql.schema_version) { + // FIXME: take schema version from somewhere else than default config file + if (dbSchemaVersion < config.mysql.schema_version && 0) { log.error('Database', 'Database schema outdated. Run `npm run sql` to upgrade'); return process.exit(1); }