mirror of
https://github.com/slawkens/myaac.git
synced 2025-10-26 22:14:18 +01:00
migrate command: show "Already on latest version"
This commit is contained in:
@@ -9,6 +9,8 @@
|
||||
*/
|
||||
defined('MYAAC') or die('Direct access not allowed!');
|
||||
|
||||
global $db;
|
||||
|
||||
// database migrations
|
||||
$tmp = '';
|
||||
if(fetchDatabaseConfig('database_version', $tmp)) { // we got version
|
||||
|
||||
@@ -22,6 +22,16 @@ class MigrateCommand extends Command
|
||||
$this->init();
|
||||
|
||||
$io = new SymfonyStyle($input, $output);
|
||||
|
||||
$tmp = '';
|
||||
if(fetchDatabaseConfig('database_version', $tmp)) { // we got version
|
||||
$tmp = (int)$tmp;
|
||||
if ($tmp >= DATABASE_VERSION) {
|
||||
$io->success('Already on latest version.');
|
||||
return Command::SUCCESS;
|
||||
}
|
||||
}
|
||||
|
||||
require SYSTEM . 'migrate.php';
|
||||
|
||||
$io->success('Migrated to latest version (' . DATABASE_VERSION . ')');
|
||||
|
||||
Reference in New Issue
Block a user