diff --git a/database/migrations/2024_09_20_101202_expand_srd_routes_table.php b/database/migrations/2024_09_20_101202_expand_srd_routes_table.php new file mode 100644 index 000000000..953b3b2bc --- /dev/null +++ b/database/migrations/2024_09_20_101202_expand_srd_routes_table.php @@ -0,0 +1,38 @@ +dropForeign('srd_note_srd_route_srd_route_id_foreign'); + }); + + // Update the srd_routes table to make the id column a bigIncrements rather than a smallIncrements + Schema::table('srd_routes', function (Blueprint $table) { + $table->bigIncrements('id')->first()->change(); + }); + + // Now update the srd_note_srd_route table to make the srd_route_id column a bigInteger rather than an integer + // and then re-add the foreign key constraint + Schema::table('srd_note_srd_route', function (Blueprint $table) { + $table->unsignedBigInteger('srd_route_id')->first()->change(); + $table->foreign('srd_route_id')->references('id')->on('srd_routes')->onDelete('cascade'); + }); + } + + /** + * Reverse the migrations. + */ + public function down(): void + { + // + } +};