string('video_codec')->nullable(); $table->float('video_framerate')->nullable(); $table->dropForeign(['model_id']); $table->dropColumn(['identifier','channelmode','model_id']); }); } /** * Reverse the migrations. */ public function down(): void { DB::statement('ALTER TABLE videos RENAME COLUMN audio_codec TO codec'); DB::statement('ALTER TABLE videos RENAME COLUMN audio_samplerate TO samplerate'); DB::statement('ALTER TABLE videos RENAME COLUMN audio_channels TO audiochannels'); Schema::table('videos', function (Blueprint $table) { $table->dropColumn(['video_codec','video_framerate']); $table->string('identifier')->nullable(); $table->string('channelmode',16)->nullable(); $table->bigInteger('model_id')->unsigned()->nullable(); $table->foreign('model_id')->references('id')->on('models'); }); } };