diff --git a/database/migrations/2026_02_05_700000_create_holidays_table.php b/database/migrations/2026_02_05_700000_create_holidays_table.php new file mode 100644 index 0000000..da50187 --- /dev/null +++ b/database/migrations/2026_02_05_700000_create_holidays_table.php @@ -0,0 +1,34 @@ +id(); + $table->unsignedBigInteger('tenant_id'); + $table->date('start_date')->comment('시작일'); + $table->date('end_date')->comment('종료일 (단일 휴일이면 start_date와 동일)'); + $table->string('name', 100)->comment('휴일명'); + $table->string('type', 30)->default('public')->comment('유형: public(공휴일), company(회사지정), etc'); + $table->boolean('is_recurring')->default(false)->comment('매년 반복 여부'); + $table->text('memo')->nullable()->comment('메모'); + $table->unsignedBigInteger('created_by')->nullable(); + $table->unsignedBigInteger('updated_by')->nullable(); + $table->timestamps(); + $table->softDeletes(); + + $table->index(['tenant_id', 'start_date']); + $table->index(['tenant_id', 'end_date']); + }); + } + + public function down(): void + { + Schema::dropIfExists('holidays'); + } +};