Bổ sung xóa ngày phép
This commit is contained in:
parent
7dc31bf75b
commit
2011797dd6
|
|
@ -0,0 +1,40 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
use Illuminate\Database\Migrations\Migration;
|
||||||
|
use Illuminate\Database\Schema\Blueprint;
|
||||||
|
use Illuminate\Support\Facades\Schema;
|
||||||
|
use Illuminate\Support\Facades\DB;
|
||||||
|
|
||||||
|
class AddDayWorkSpecialCategory extends Migration
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* Run the migrations.
|
||||||
|
*
|
||||||
|
* @return void
|
||||||
|
*/
|
||||||
|
public function up()
|
||||||
|
{
|
||||||
|
DB::table('categories')->insert([
|
||||||
|
'c_code' => '17-05-2025',
|
||||||
|
'c_name' => 'Ngày làm việc đặc biệt',
|
||||||
|
'c_type' => 'DAY_WORK_SPECIAL',
|
||||||
|
'c_value' => '2025',
|
||||||
|
'c_active' => 1,
|
||||||
|
'created_at' => now(),
|
||||||
|
'updated_at' => now(),
|
||||||
|
]);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Reverse the migrations.
|
||||||
|
*
|
||||||
|
* @return void
|
||||||
|
*/
|
||||||
|
public function down()
|
||||||
|
{
|
||||||
|
DB::table('categories')
|
||||||
|
->where('c_code', '17-05-2025')
|
||||||
|
->where('c_type', 'DAY_WORK_SPECIAL')
|
||||||
|
->delete();
|
||||||
|
}
|
||||||
|
}
|
||||||
Loading…
Reference in New Issue