From f85d634ac895a6ad937d8bc0861cc483d07da1cb Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Fri, 26 Apr 2013 11:43:10 +0200 Subject: Add database name to changelog --- odb/generator.cxx | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'odb/generator.cxx') diff --git a/odb/generator.cxx b/odb/generator.cxx index 1ca094f..a4e1303 100644 --- a/odb/generator.cxx +++ b/odb/generator.cxx @@ -251,6 +251,14 @@ generate (options const& ops, xml::parser p (is, in_log_path.string ()); old_changelog.reset (new (shared) sema_rel::changelog (p)); + + if (old_changelog->database () != db.string ()) + { + cerr << in_log_path << ": error: wrong database '" << + old_changelog->database () << "', expected '" << db << + "'" << endl; + throw generator::failed (); + } } catch (const ios_base::failure& e) { @@ -270,7 +278,7 @@ generate (options const& ops, old_changelog.get (), in_log_path.string (), out_log_path.string (), - ops.init_changelog ()); + ops); } // Output files. -- cgit v1.1