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); }