mirror of
https://github.com/lkddi/nexusphp.git
synced 2026-04-15 05:00:49 +08:00
attendance remove total_points
This commit is contained in:
@@ -4,7 +4,7 @@ use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
class AddTotalDaysAndTotalPointsToAttendanceTable extends Migration
|
||||
class AddTotalDaysToAttendanceTable extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
@@ -13,12 +13,8 @@ class AddTotalDaysAndTotalPointsToAttendanceTable extends Migration
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
if (Schema::hasColumns('attendance',['total_days', 'total_points'])) {
|
||||
return;
|
||||
}
|
||||
Schema::table('attendance', function (Blueprint $table) {
|
||||
$table->integer('total_days')->default(0);
|
||||
$table->integer('total_points')->default(0);
|
||||
});
|
||||
}
|
||||
|
||||
@@ -30,7 +26,7 @@ class AddTotalDaysAndTotalPointsToAttendanceTable extends Migration
|
||||
public function down()
|
||||
{
|
||||
Schema::table('attendance', function (Blueprint $table) {
|
||||
$table->dropColumn(['total_days', 'total_points']);
|
||||
$table->dropColumn('total_days');
|
||||
});
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user