integer('system_id'); $table->dropColumn(['description','ipv4','ipv4_mask','ipv6','ipv6_mask','zt_id']); $table->string('ztid')->nullable(); $table->dropUnique(['domain_id']); $table->foreign('system_id')->references('id')->on('systems'); }); } /** * Reverse the migrations. * * @return void */ public function down() { DB::statement('ALTER TABLE zones ALTER COLUMN domain_id DROP NOT NULL'); Schema::table('zones', function (Blueprint $table) { $table->dropForeign(['system_id']); $table->dropColumn(['system_id','ztid']); $table->unique('domain_id'); $table->string('description'); $table->ipAddress('ipv4')->nullable(); $table->integer('ipv4_mask')->nullable(); $table->ipAddress('ipv6')->nullable(); $table->integer('ipv6_mask')->nullable(); $table->binary('zt_id')->nullable()->unique(); }); } }