feat: [pm] 이슈 일정 필드 추가 마이그레이션
- admin_pm_issues 테이블에 start_date, due_date, estimated_hours 컬럼 추가 - due_date 인덱스 추가
This commit is contained in:
@@ -0,0 +1,36 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
use Illuminate\Database\Migrations\Migration;
|
||||||
|
use Illuminate\Database\Schema\Blueprint;
|
||||||
|
use Illuminate\Support\Facades\Schema;
|
||||||
|
|
||||||
|
return new class extends Migration
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* Run the migrations.
|
||||||
|
*
|
||||||
|
* admin_pm_issues 테이블에 일정 관련 필드 추가
|
||||||
|
*/
|
||||||
|
public function up(): void
|
||||||
|
{
|
||||||
|
Schema::table('admin_pm_issues', function (Blueprint $table) {
|
||||||
|
$table->date('start_date')->nullable()->after('status')->comment('시작일');
|
||||||
|
$table->date('due_date')->nullable()->after('start_date')->comment('마감일');
|
||||||
|
$table->unsignedInteger('estimated_hours')->nullable()->after('due_date')->comment('예상 시간(시)');
|
||||||
|
|
||||||
|
// 인덱스
|
||||||
|
$table->index('due_date', 'idx_admin_pm_issues_due_date');
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Reverse the migrations.
|
||||||
|
*/
|
||||||
|
public function down(): void
|
||||||
|
{
|
||||||
|
Schema::table('admin_pm_issues', function (Blueprint $table) {
|
||||||
|
$table->dropIndex('idx_admin_pm_issues_due_date');
|
||||||
|
$table->dropColumn(['start_date', 'due_date', 'estimated_hours']);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
};
|
||||||
Reference in New Issue
Block a user