bigInteger('ab_service_adsl_id')->nullable(); $table->foreign('ab_service_adsl_id')->references('id')->on('ab_service__adsl'); $table->unique(['ab_service_adsl_id','date','time']); }); DB::statement('ALTER TABLE ab_service__adsl_traffic CHANGE COLUMN service service varchar(128) DEFAULT NULL'); } /** * Reverse the migrations. * * @return void */ public function down() { DB::statement('ALTER TABLE ab_service__adsl_traffic CHANGE COLUMN service service varchar(128) NOT NULL'); Schema::table('ab_service__adsl_traffic', function (Blueprint $table) { $table->dropForeign(['ab_service_adsl_id']); $table->dropUnique(['ab_service_adsl_id','date','time']); $table->dropColumn('ab_service_adsl_id'); }); } }