id(); $table->string('order_num', 255)->unique()->nullable(); $table->bigInteger('customer_id')->default(0)->index(); $table->integer('date')->nullable(); $table->integer('user_id')->default(0); $table->integer('discount_id')->default(0); $table->integer('invoice_id')->default(0); $table->integer('discount_value')->nullable(); $table->integer('amount')->nullable(); $table->text('note')->nullable(); $table->string('client_ip', 100)->nullable(); $table->tinyInteger('status')->default(0); $table->timestamps(); }); } /** * Reverse the migrations. * * @return void */ public function down() { // Schema::table('order', function (Blueprint $table) { $table->dropForeign(['customer_id', 'discount_id']); $table->drop(); }); } };