diff --git a/database/migrations/2026_05_11_115552_add_phase_id_to_inspection_templates.php b/database/migrations/2026_05_11_115552_add_phase_id_to_inspection_templates.php new file mode 100644 index 0000000..c567cd7 --- /dev/null +++ b/database/migrations/2026_05_11_115552_add_phase_id_to_inspection_templates.php @@ -0,0 +1,30 @@ +foreignId('phase_id')->nullable()->constrained('phases')->onDelete('set null'); + $table->index('phase_id'); + }); + } + + /** + * Reverse the migrations. + */ + public function down(): void + { + Schema::table('inspection_templates', function (Blueprint $table) { + $table->dropForeign(['phase_id']); + $table->dropColumn('phase_id'); + }); + } +};