From 4c02ff64f147a1bd312fcda1c97794224ed9fc81 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EA=B9=80=EB=B3=B4=EA=B3=A4?= Date: Mon, 9 Feb 2026 21:25:03 +0900 Subject: [PATCH] =?UTF-8?q?feat:=EA=B3=B5=EC=82=AC=ED=98=84=EC=9E=A5=20?= =?UTF-8?q?=EC=82=AC=EC=A7=84=EB=8C=80=EC=A7=80=20=ED=85=8C=EC=9D=B4?= =?UTF-8?q?=EB=B8=94=20=EB=A7=88=EC=9D=B4=EA=B7=B8=EB=A0=88=EC=9D=B4?= =?UTF-8?q?=EC=85=98=20=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit construction_site_photos 테이블 생성 (현장명, 작업일자, 작업전/작업중/작업후 사진 GCS 경로) Co-Authored-By: Claude Opus 4.6 --- ..._create_construction_site_photos_table.php | 48 +++++++++++++++++++ 1 file changed, 48 insertions(+) create mode 100644 database/migrations/2026_02_09_200000_create_construction_site_photos_table.php diff --git a/database/migrations/2026_02_09_200000_create_construction_site_photos_table.php b/database/migrations/2026_02_09_200000_create_construction_site_photos_table.php new file mode 100644 index 0000000..c0e1291 --- /dev/null +++ b/database/migrations/2026_02_09_200000_create_construction_site_photos_table.php @@ -0,0 +1,48 @@ +id(); + $table->unsignedBigInteger('tenant_id')->comment('테넌트 ID'); + $table->unsignedBigInteger('user_id')->comment('등록자 ID'); + + $table->string('site_name', 200)->comment('현장명'); + $table->date('work_date')->comment('작업일자'); + $table->text('description')->nullable()->comment('설명'); + + // 작업전 사진 + $table->string('before_photo_path', 500)->nullable()->comment('작업전 사진 GCS 경로'); + $table->string('before_photo_gcs_uri', 500)->nullable()->comment('작업전 사진 GCS URI'); + $table->unsignedInteger('before_photo_size')->nullable()->comment('작업전 사진 파일크기(bytes)'); + + // 작업중 사진 + $table->string('during_photo_path', 500)->nullable()->comment('작업중 사진 GCS 경로'); + $table->string('during_photo_gcs_uri', 500)->nullable()->comment('작업중 사진 GCS URI'); + $table->unsignedInteger('during_photo_size')->nullable()->comment('작업중 사진 파일크기(bytes)'); + + // 작업후 사진 + $table->string('after_photo_path', 500)->nullable()->comment('작업후 사진 GCS 경로'); + $table->string('after_photo_gcs_uri', 500)->nullable()->comment('작업후 사진 GCS URI'); + $table->unsignedInteger('after_photo_size')->nullable()->comment('작업후 사진 파일크기(bytes)'); + + $table->timestamps(); + $table->softDeletes(); + + $table->index('tenant_id', 'idx_csp_tenant'); + $table->index('user_id', 'idx_csp_user'); + $table->index(['tenant_id', 'work_date'], 'idx_csp_tenant_work_date'); + }); + } + + public function down(): void + { + Schema::dropIfExists('construction_site_photos'); + } +};