diff --git a/database/migrations/2026_03_12_120000_create_pmis_workers_table.php b/database/migrations/2026_03_12_120000_create_pmis_workers_table.php deleted file mode 100644 index ffda5f3..0000000 --- a/database/migrations/2026_03_12_120000_create_pmis_workers_table.php +++ /dev/null @@ -1,38 +0,0 @@ -id(); - $table->unsignedBigInteger('tenant_id')->default(1)->index(); - $table->unsignedBigInteger('user_id')->nullable()->index()->comment('SAM users 테이블 FK (연결된 계정)'); - $table->string('name', 50); - $table->string('login_id', 50)->nullable()->comment('PMIS 로그인 아이디'); - $table->string('phone', 20)->nullable(); - $table->string('email', 255)->nullable(); - $table->string('department', 100)->nullable()->comment('소속 부서/현장소장 등'); - $table->string('position', 50)->nullable()->comment('직책'); - $table->string('role_type', 50)->nullable()->comment('권한 유형: 협력업체사용자, 원청관리자 등'); - $table->string('gender', 5)->nullable(); - $table->string('company', 100)->nullable()->comment('소속 업체명'); - $table->string('profile_photo_path', 500)->nullable(); - $table->json('options')->nullable(); - $table->timestamp('last_login_at')->nullable(); - $table->timestamps(); - $table->softDeletes(); - - $table->unique(['tenant_id', 'user_id'], 'pmis_workers_tenant_user_unique'); - }); - } - - public function down(): void - { - Schema::dropIfExists('pmis_workers'); - } -}; diff --git a/database/migrations/2026_03_12_140000_create_pmis_job_types_table.php b/database/migrations/2026_03_12_140000_create_pmis_job_types_table.php deleted file mode 100644 index 7fcaecd..0000000 --- a/database/migrations/2026_03_12_140000_create_pmis_job_types_table.php +++ /dev/null @@ -1,30 +0,0 @@ -id(); - $table->unsignedBigInteger('tenant_id'); - $table->string('name', 100); - $table->integer('sort_order')->default(0); - $table->boolean('is_active')->default(true); - $table->json('options')->nullable(); - $table->timestamps(); - $table->softDeletes(); - - $table->index('tenant_id'); - $table->index(['tenant_id', 'name']); - }); - } - - public function down(): void - { - Schema::dropIfExists('pmis_job_types'); - } -}; diff --git a/database/migrations/2026_03_12_140001_create_pmis_construction_workers_table.php b/database/migrations/2026_03_12_140001_create_pmis_construction_workers_table.php deleted file mode 100644 index d2c021e..0000000 --- a/database/migrations/2026_03_12_140001_create_pmis_construction_workers_table.php +++ /dev/null @@ -1,39 +0,0 @@ -id(); - $table->unsignedBigInteger('tenant_id'); - $table->string('company_name', 200); - $table->string('trade_name', 100); - $table->unsignedBigInteger('job_type_id')->nullable(); - $table->string('name', 50); - $table->string('phone', 20)->nullable(); - $table->string('birth_date', 6)->nullable()->comment('YYMMDD'); - $table->char('ssn_gender', 1)->nullable()->comment('주민번호 뒷자리 첫째'); - $table->unsignedInteger('wage')->default(0); - $table->string('blood_type', 5)->nullable(); - $table->text('remark')->nullable(); - $table->json('options')->nullable(); - $table->timestamps(); - $table->softDeletes(); - - $table->index('tenant_id'); - $table->index(['tenant_id', 'company_name']); - $table->index(['tenant_id', 'name']); - $table->foreign('job_type_id')->references('id')->on('pmis_job_types')->nullOnDelete(); - }); - } - - public function down(): void - { - Schema::dropIfExists('pmis_construction_workers'); - } -}; diff --git a/database/migrations/2026_03_12_150000_create_pmis_equipments_table.php b/database/migrations/2026_03_12_150000_create_pmis_equipments_table.php deleted file mode 100644 index 3042742..0000000 --- a/database/migrations/2026_03_12_150000_create_pmis_equipments_table.php +++ /dev/null @@ -1,39 +0,0 @@ -id(); - $table->unsignedBigInteger('tenant_id'); - $table->string('company_name', 200); - $table->string('equipment_code', 50)->nullable(); - $table->string('equipment_name', 200); - $table->string('specification', 300)->nullable(); - $table->string('unit', 50)->nullable(); - $table->string('equipment_number', 100); - $table->string('operator', 50)->nullable()->comment('운전원'); - $table->date('inspection_end_date')->nullable()->comment('검사종료일'); - $table->boolean('inspection_not_applicable')->default(false)->comment('검사 해당없음'); - $table->date('insurance_end_date')->nullable()->comment('보험종료일'); - $table->boolean('insurance_not_applicable')->default(false)->comment('보험 해당없음'); - $table->json('options')->nullable(); - $table->timestamps(); - $table->softDeletes(); - - $table->index('tenant_id'); - $table->index(['tenant_id', 'company_name']); - $table->index(['tenant_id', 'equipment_name']); - }); - } - - public function down(): void - { - Schema::dropIfExists('pmis_equipments'); - } -}; diff --git a/database/migrations/2026_03_12_160000_create_pmis_materials_table.php b/database/migrations/2026_03_12_160000_create_pmis_materials_table.php deleted file mode 100644 index 826429b..0000000 --- a/database/migrations/2026_03_12_160000_create_pmis_materials_table.php +++ /dev/null @@ -1,34 +0,0 @@ -id(); - $table->unsignedBigInteger('tenant_id'); - $table->string('company_name', 200); - $table->string('material_code', 50)->nullable(); - $table->string('material_name', 200); - $table->string('specification', 300)->nullable(); - $table->string('unit', 50)->nullable(); - $table->decimal('design_quantity', 14, 2)->default(0)->comment('설계량'); - $table->json('options')->nullable(); - $table->timestamps(); - $table->softDeletes(); - - $table->index('tenant_id'); - $table->index(['tenant_id', 'company_name']); - $table->index(['tenant_id', 'material_name']); - }); - } - - public function down(): void - { - Schema::dropIfExists('pmis_materials'); - } -};