diff --git a/database/migrations/2024_11_18_113619_configure_error_foreign_key.php b/database/migrations/2024_11_18_113619_configure_error_foreign_key.php index 1ab897305..161c8443c 100644 --- a/database/migrations/2024_11_18_113619_configure_error_foreign_key.php +++ b/database/migrations/2024_11_18_113619_configure_error_foreign_key.php @@ -11,6 +11,11 @@ */ public function up(): void { + echo 'Converting configureerror.configureid to int' . PHP_EOL; + Schema::table('configureerror', function (Blueprint $table) { + $table->integer('configureid')->change(); + }); + echo "Adding foreign key constraint configureerror(configureid)->configure(id)..."; $num_deleted = DB::delete("DELETE FROM configureerror WHERE configureid NOT IN (SELECT id FROM configure)"); echo $num_deleted . ' invalid rows deleted' . PHP_EOL;