Update source into github
This commit is contained in:
@@ -0,0 +1,46 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
return new class extends Migration {
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
//
|
||||
Schema::create('order', function (Blueprint $table) {
|
||||
$table->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();
|
||||
});
|
||||
}
|
||||
};
|
||||
Reference in New Issue
Block a user