large commit

This commit is contained in:
Omair Saleh
2019-06-03 10:29:08 +08:00
parent 2546b4a7fa
commit 919e0252f7
113 changed files with 2556 additions and 1815 deletions
@@ -15,12 +15,12 @@ class CreateContactsTable extends Migration
{
Schema::create('contacts', function (Blueprint $table) {
$table->increments('id');
$table->string('type');
$table->integer('type');
$table->string('reference_id');
$table->string('name');
$table->string('designation');
$table->string('designation')->nullable();
$table->string('contact');
$table->string('email');
$table->string('email')->nullable();
$table->timestamps();
});
}
@@ -22,7 +22,7 @@ class CreateOrdersTable extends Migration
$table->string('warehouse_id')->nullable();
$table->string('address_id');
$table->string('current_step')->nullable();
$table->integer('complete')->default(0);
$table->boolean('complete')->default(0);
$table->softDeletes();
$table->timestamps();
@@ -18,8 +18,8 @@ class CreateOrderStepsTable extends Migration
$table->integer('order_id')->unsigned()->index();
$table->string('reference_id');
$table->integer('primary')->default(0);
$table->decimal('sequence');
$table->integer('complete')->default(0);
$table->decimal('sequence', 4, 2);
$table->boolean('complete')->default(0);
$table->date('complete_date')->nullable();
$table->timestamps();
@@ -4,7 +4,7 @@ use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class CreateReceiveNotesTable extends Migration
class CreateTrackingNumbersTable extends Migration
{
/**
* Run the migrations.
@@ -13,9 +13,11 @@ class CreateReceiveNotesTable extends Migration
*/
public function up()
{
Schema::create('receive_notes', function (Blueprint $table) {
Schema::create('tracking_numbers', function (Blueprint $table) {
$table->increments('id');
$table->integer('order_id')->unsigned()->index();
$table->integer('type');
$table->string('courier')->nullable();
$table->string('tracking_no');
$table->timestamps();
@@ -17,10 +17,11 @@ class CreatePackages extends Migration
$table->increments('id');
$table->integer('list_id')->unsigned()->index();
$table->integer('type')->default(0);
$table->string('description');
$table->integer('width');
$table->integer('length');
$table->integer('height');
$table->string('description')->nullable();
$table->decimal('width', 5, 3);
$table->decimal('length', 5, 3);
$table->decimal('height', 5, 3);
$table->integer('weight')->default(0);
$table->integer('quantity');
$table->timestamps();
@@ -16,6 +16,7 @@ class CreateShippingArrangementsTable extends Migration
Schema::create('shipping_arrangements', function (Blueprint $table) {
$table->increments('id');
$table->integer('order_id')->unsigned()->index();
$table->integer('type')->default(0);
$table->string('container_no');
$table->string('seal_no');
$table->timestamps();
@@ -4,7 +4,7 @@ use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class CreateShippingSchedulesTable extends Migration
class CreateSchedulesTable extends Migration
{
/**
* Run the migrations.
@@ -13,15 +13,16 @@ class CreateShippingSchedulesTable extends Migration
*/
public function up()
{
Schema::create('shipping_schedules', function (Blueprint $table) {
Schema::create('schedules', function (Blueprint $table) {
$table->increments('id');
$table->integer('arrangement_id')->unsigned()->index();
$table->integer('type');
$table->integer('arrangement_id');
$table->date('ETD');
$table->date('ETA');
$table->integer('status')->default(0);
$table->string('issue_remark')->nullable();
$table->timestamps();
$table->foreign('arrangement_id')->references('id')->on('shipping_arrangements');
});
}
@@ -4,7 +4,7 @@ use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class CreateCustomIssuesTable extends Migration
class CreateDeliveryArrangements extends Migration
{
/**
* Run the migrations.
@@ -13,13 +13,14 @@ class CreateCustomIssuesTable extends Migration
*/
public function up()
{
Schema::create('custom_issues', function (Blueprint $table) {
Schema::create('delivery_arrangements', function (Blueprint $table) {
$table->increments('id');
$table->integer('schedule_id')->unsigned()->index();
$table->text('remark');
$table->integer('order_id')->unsigned()->index();
$table->integer('type')->default(0);
$table->string('vehicle_no')->nullable();
$table->timestamps();
// $table->foreign('schedule_id')->references('id')->on('shipping_schedule');
$table->foreign('order_id')->references('id')->on('orders');
});
}
@@ -30,6 +31,6 @@ class CreateCustomIssuesTable extends Migration
*/
public function down()
{
Schema::dropIfExists('custom_issues');
Schema::dropIfExists('delivery_arrangements');
}
}