From f8e19779a01d13ee6568e44131e4dc43a69dbfac Mon Sep 17 00:00:00 2001 From: Marcin Kurczewski Date: Sat, 23 Nov 2013 17:28:25 +0100 Subject: [PATCH] Cosmetic change to property model --- src/Models/Model_Property.php | 1 + upgrade.php | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/Models/Model_Property.php b/src/Models/Model_Property.php index 06da4df8..c59f44d5 100644 --- a/src/Models/Model_Property.php +++ b/src/Models/Model_Property.php @@ -4,6 +4,7 @@ class Model_Property extends RedBean_SimpleModel const FeaturedPostId = 0; const FeaturedPostUserName = 1; const FeaturedPostDate = 2; + const DbVersion = 'db-version'; static $allProperties = null; diff --git a/upgrade.php b/upgrade.php index 4a1f0f71..c3700db3 100644 --- a/upgrade.php +++ b/upgrade.php @@ -2,7 +2,7 @@ require_once 'src/core.php'; $config = \Chibi\Registry::getConfig(); -$dbVersion = Model_Property::get('db-version'); +$dbVersion = Model_Property::get(Model_Property::DbVersion); printf('DB version = %d' . PHP_EOL, $dbVersion); $upgrades = glob('src/Upgrades/*.sql'); @@ -28,5 +28,5 @@ foreach ($upgrades as $upgradePath) } } - Model_Property::set('db-version', $upgradeVersion); + Model_Property::set(Model_Property::DbVersion, $upgradeVersion); }