v.1.7 update
This commit is contained in:
@@ -0,0 +1,35 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
class CreateOrdersTable extends Migration {
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up() {
|
||||
Schema::create('orders', function (Blueprint $table) {
|
||||
$table->id();
|
||||
$table->integer('total_count')->nullable();
|
||||
$table->integer('total_price')->nullable();
|
||||
$table->integer('staff_id');
|
||||
$table->string('client_id')->nullable();
|
||||
$table->integer('is_send');
|
||||
$table->integer('is_delivery')->nullable();
|
||||
$table->integer('is_pickup')->nullable();
|
||||
$table->timestamps();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down() {
|
||||
Schema::dropIfExists('orders');
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,35 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
class CreateOrderItemsTable extends Migration {
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up() {
|
||||
Schema::create('order_items', function (Blueprint $table) {
|
||||
$table->id();
|
||||
$table->integer('order_id');
|
||||
$table->integer('item_id');
|
||||
$table->integer('modifier_id')->nullable();
|
||||
$table->integer('parent_id')->nullable();
|
||||
$table->integer('item_count');
|
||||
$table->integer('item_price');
|
||||
$table->integer('staff_id');
|
||||
$table->timestamps();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down() {
|
||||
Schema::dropIfExists('order_items');
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user