summaryrefslogtreecommitdiffstats
path: root/inc/database.inc.php
diff options
context:
space:
mode:
Diffstat (limited to 'inc/database.inc.php')
-rw-r--r--inc/database.inc.php14
1 files changed, 14 insertions, 0 deletions
diff --git a/inc/database.inc.php b/inc/database.inc.php
index e7a16ba1..a729b7fc 100644
--- a/inc/database.inc.php
+++ b/inc/database.inc.php
@@ -9,6 +9,20 @@ class Database
private static $dbh = false;
private static $statements = array();
+
+ /**
+ * Get database schema version - used for checking for updates
+ * @return int Version of db schema
+ */
+ public static function getExpectedSchemaVersion()
+ {
+ return 5;
+ }
+
+ public static function needSchemaUpdate()
+ {
+ return Property::getCurrentSchemaVersion() < self::getExpectedSchemaVersion();
+ }
/**
* Connect to the DB if not already connected.