fix upgrade attendance & change to v1.6.0

This commit is contained in:
xiaomlove
2022-03-08 22:16:26 +08:00
parent 57569d7c51
commit b8c288d07b
2 changed files with 11 additions and 5 deletions
+2 -2
View File
@@ -1,6 +1,6 @@
<?php
defined('VERSION_NUMBER') || define('VERSION_NUMBER', '1.6.0-beta14');
defined('RELEASE_DATE') || define('RELEASE_DATE', '2022-03-04');
defined('VERSION_NUMBER') || define('VERSION_NUMBER', '1.6.0');
defined('RELEASE_DATE') || define('RELEASE_DATE', '2022-03-08');
defined('IN_TRACKER') || define('IN_TRACKER', true);
defined('PROJECTNAME') || define("PROJECTNAME","NexusPHP");
defined('NEXUSPHPURL') || define("NEXUSPHPURL","https://nexusphp.org");
+9 -3
View File
@@ -133,9 +133,15 @@ class Update extends Install
*
* attendance change, do migrate
*/
if (WITH_LARAVEL && !NexusDB::schema()->hasColumn('attendance', 'total_days')) {
$this->runMigrate('database/migrations/2021_06_13_215440_add_total_days_to_attendance_table.php');
$this->migrateAttendance();
if (WITH_LARAVEL) {
if (!NexusDB::schema()->hasTable('attendance')) {
//no table yet, no need to migrate
$this->runMigrate('database/migrations/2021_06_08_113437_create_attendance_table.php');
}
if (!NexusDB::schema()->hasColumn('attendance', 'total_days')) {
$this->runMigrate('database/migrations/2021_06_13_215440_add_total_days_to_attendance_table.php');
$this->migrateAttendance();
}
}
/**