From 7fb59e3beca03493426d0b4c4153d7e6b6d2f34b Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Mon, 2 Sep 2013 08:33:25 +0200 Subject: Support for versioning simple value in object --- odb/database.hxx | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'odb/database.hxx') diff --git a/odb/database.hxx b/odb/database.hxx index ea5a37a..c7c4598 100644 --- a/odb/database.hxx +++ b/odb/database.hxx @@ -370,6 +370,13 @@ namespace odb schema_version_table (const std::string& table_name, const std::string& schema_name); + // Schema version sequence number. It is incremented every time + // the schema version or migration flag is changed and can be + // used to detect version changes. The starting value is 1. + // + unsigned int + schema_version_sequence () const; + protected: struct schema_version_info: schema_version_migration_type { @@ -471,6 +478,7 @@ namespace odb std::string schema_version_table_; mutable schema_version_map schema_version_map_; + unsigned int schema_version_seq_; }; } -- cgit v1.1