summaryrefslogtreecommitdiff
path: root/odb/semantics
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2013-09-17 12:01:47 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2013-09-17 12:01:47 +0200
commite32e4b9d8d79dd5491891b1a2c5ac9ad9b631780 (patch)
treeb6a6f2e422078809227b84663839193af9c6a17e /odb/semantics
parent791b94b894f93bc037637907616efc844f3d9414 (diff)
Add schema name to changelog
Diffstat (limited to 'odb/semantics')
-rw-r--r--odb/semantics/relational/changelog.cxx3
-rw-r--r--odb/semantics/relational/changelog.hxx7
2 files changed, 9 insertions, 1 deletions
diff --git a/odb/semantics/relational/changelog.cxx b/odb/semantics/relational/changelog.cxx
index 73dac77..800fb97 100644
--- a/odb/semantics/relational/changelog.cxx
+++ b/odb/semantics/relational/changelog.cxx
@@ -30,6 +30,7 @@ namespace semantics
throw parsing (p, "unsupported changelog format version");
database_ = p.attribute ("database");
+ schema_name_ = p.attribute ("schema-name", "");
// Because things are stored in the reverse order, first save the
// changesets as XML chunks and then re-parse them in the reverse
@@ -128,6 +129,8 @@ namespace semantics
s.start_element (xmlns, "changelog");
s.namespace_decl (xmlns, "");
s.attribute ("database", database_);
+ if (!schema_name_.empty ())
+ s.attribute ("schema-name", schema_name_);
s.attribute ("version", 1); // Format version.
// For better readability serialize things in reverse order so that
diff --git a/odb/semantics/relational/changelog.hxx b/odb/semantics/relational/changelog.hxx
index a27c946..c740c7c 100644
--- a/odb/semantics/relational/changelog.hxx
+++ b/odb/semantics/relational/changelog.hxx
@@ -122,8 +122,12 @@ namespace semantics
string const&
database () const {return database_;}
+ string const&
+ schema_name () const {return schema_name_;}
+
public:
- changelog (string const& db): database_ (db), contains_model_ (0) {}
+ changelog (string const& db, string const& sn)
+ : database_ (db), schema_name_ (sn), contains_model_ (0) {}
changelog (xml::parser&);
void
@@ -151,6 +155,7 @@ namespace semantics
protected:
string database_;
+ string schema_name_;
contains_model_type* contains_model_;
contains_changeset_list contains_changeset_;
};