Cosmetic change to property model
This commit is contained in:
parent
3b532532d1
commit
f8e19779a0
2 changed files with 3 additions and 2 deletions
|
@ -4,6 +4,7 @@ class Model_Property extends RedBean_SimpleModel
|
||||||
const FeaturedPostId = 0;
|
const FeaturedPostId = 0;
|
||||||
const FeaturedPostUserName = 1;
|
const FeaturedPostUserName = 1;
|
||||||
const FeaturedPostDate = 2;
|
const FeaturedPostDate = 2;
|
||||||
|
const DbVersion = 'db-version';
|
||||||
|
|
||||||
static $allProperties = null;
|
static $allProperties = null;
|
||||||
|
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
require_once 'src/core.php';
|
require_once 'src/core.php';
|
||||||
$config = \Chibi\Registry::getConfig();
|
$config = \Chibi\Registry::getConfig();
|
||||||
|
|
||||||
$dbVersion = Model_Property::get('db-version');
|
$dbVersion = Model_Property::get(Model_Property::DbVersion);
|
||||||
printf('DB version = %d' . PHP_EOL, $dbVersion);
|
printf('DB version = %d' . PHP_EOL, $dbVersion);
|
||||||
|
|
||||||
$upgrades = glob('src/Upgrades/*.sql');
|
$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);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue