chore: cleanup dead code + format with Pint

- Remove unused FeaturesController (empty stubs, no routes)
- Remove ConvertSpatialFile CLI command (unused; service used in LayerManager)
- Remove MigrateGeojsonToFeatures CLI command (one-shot migration, not referenced)
- Remove .claude/worktrees/ (11 old agent worktrees from June)
- Apply Laravel Pint formatting across 219 files (style only, no functional changes)

Tests: 101 passing (319 assertions)
API routes: unchanged (8 routes intact)
This commit is contained in:
Javier Braña
2026-08-28 13:04:28 +02:00
parent 2dccd59385
commit 90630379fb
139 changed files with 2888 additions and 2510 deletions
@@ -30,4 +30,4 @@ return new class extends Migration
{
Schema::dropIfExists('projects');
}
};
};
@@ -29,4 +29,4 @@ return new class extends Migration
{
Schema::dropIfExists('phases');
}
};
};
@@ -25,4 +25,4 @@ return new class extends Migration
{
Schema::dropIfExists('layers');
}
};
};
@@ -25,4 +25,4 @@ return new class extends Migration
{
Schema::dropIfExists('progress_updates');
}
};
};
@@ -22,4 +22,4 @@ return new class extends Migration
{
Schema::dropIfExists('pending_syncs');
}
};
};
@@ -21,4 +21,4 @@ return new class extends Migration
{
Schema::dropIfExists('project_user');
}
};
};
@@ -30,4 +30,4 @@ return new class extends Migration
{
Schema::dropIfExists('media');
}
};
};
@@ -36,4 +36,4 @@ return new class extends Migration
{
Schema::dropIfExists('companies');
}
};
};
@@ -30,4 +30,4 @@ return new class extends Migration
{
Schema::dropIfExists('company_project');
}
};
};
@@ -32,7 +32,9 @@ return new class extends Migration
foreach ($rows as $r) {
// Evitar duplicados; si el proyecto ya no existe lo ignoramos
$projectExists = DB::table('projects')->where('id', $r->project_id)->exists();
if (! $projectExists) continue;
if (! $projectExists) {
continue;
}
DB::table('inspection_template_project')->updateOrInsert(
['inspection_template_id' => $r->id, 'project_id' => $r->project_id],
@@ -46,9 +48,15 @@ return new class extends Migration
Schema::table('inspection_templates', function (Blueprint $table) {
// 1) FK primero: si no la dropeamos, MySQL rechaza soltar el índice
// que la sustenta ("needed in a foreign key constraint").
try { $table->dropForeign(['phase_id']); } catch (\Throwable $e) { /* sqlite sin FKs / ya inexistente */ }
try {
$table->dropForeign(['phase_id']);
} catch (Throwable $e) { /* sqlite sin FKs / ya inexistente */
}
// 2) Índice después (nombre por convención de Laravel).
try { $table->dropIndex('inspection_templates_phase_id_index'); } catch (\Throwable $e) { /* ya no existe */ }
try {
$table->dropIndex('inspection_templates_phase_id_index');
} catch (Throwable $e) { /* ya no existe */
}
// 3) Columna al final.
$table->dropColumn('phase_id');
});
@@ -48,4 +48,4 @@ return new class extends Migration
{
Schema::dropIfExists('tasks');
}
};
};
@@ -30,4 +30,4 @@ return new class extends Migration
{
Schema::dropIfExists('comments');
}
};
};
@@ -21,4 +21,4 @@ return new class extends Migration
$table->dropColumn(['baseline_start', 'baseline_end']);
});
}
};
};
@@ -24,8 +24,8 @@ return new class extends Migration
$table->dropColumn([
'planned_start', 'planned_end',
'actual_start', 'actual_end',
'baseline_start', 'baseline_end'
'baseline_start', 'baseline_end',
]);
});
}
};
};
@@ -20,7 +20,7 @@ return new class extends Migration
$table->string('method')->default('manual'); // manual|inspection|task|geometry|hybrid
$table->json('metadata')->nullable(); // {earned_value, planned_value, actual_cost, spi, cpi, ...}
$table->timestamps();
// Short index name for MySQL 64-char limit
$table->unique(['trackable_type', 'trackable_id', 'snapshot_date'], 'ps_trackable_date_unique');
$table->index(['trackable_type', 'trackable_id', 'snapshot_date'], 'ps_trackable_date_idx');
@@ -32,4 +32,4 @@ return new class extends Migration
{
Schema::dropIfExists('progress_snapshots');
}
};
};