fix conflit

This commit is contained in:
Too
2018-06-28 12:45:02 +08:00
44 changed files with 11617 additions and 340 deletions
@@ -0,0 +1,9 @@
<?php
use Faker\Generator as Faker;
$factory->define(App\SupplierBookingItem::class, function (Faker $faker) {
return [
//
];
});
@@ -0,0 +1,44 @@
<?php
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class SupplierBookingTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('supplier_bookings', function (Blueprint $table) {
$table->increments('id');
$table->string('payment_method');
$table->double('transfer_amount');
$table->double('rate');
$table->double('rebate');
$table->double('amountInRMB');
$table->double('rmbBankAmount');
$table->integer('book_id')->unsigned();
$table->foreign('book_id')->references('id')->on('bookings');
$table->integer('supplier_id')->unsigned();
$table->foreign('supplier_id')->references('id')->on('setting_suppliers');
$table->timestamps();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('supplier_bookings');
}
}
@@ -0,0 +1,34 @@
<?php
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class SupplierbookingCustomerbookingTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('supplierbooking_customerbooking', function (Blueprint $table) {
$table->integer('supplierbooking_id')->unsigned();
$table->integer('booking_id')->unsigned();
$table->foreign('supplierbooking_id')->references('id')->on('supplier_bookings');
$table->foreign('booking_id')->references('id')->on('bookings');
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('supplierbooking_customerbooking');
}
}
@@ -0,0 +1,37 @@
<?php
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class CreateSupplierBookingItemsTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('supplier_booking_items', function (Blueprint $table) {
$table->increments('id');
$table->string('china_bankslip_url');
$table->integer('book_id')->unsigned();
$table->foreign('book_id')->references('id')->on('bookings');
$table->double('bank_in_amount');
$table->integer('supplierbooking_id')->unsigned();
$table->foreign('supplierbooking_id')->references('id')->on('supplier_bookings');
$table->timestamps();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('supplier_booking_items');
}
}
@@ -0,0 +1,31 @@
<?php
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class MakePaymentmethodNulltableInSupplierbookingTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::table('supplier_bookings', function($table)
{
$table->string('payment_method')->nullable()->change();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
//
}
}
@@ -0,0 +1,32 @@
<?php
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class AddBookingidForeignkeyToChinabankslipTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::table('china_bank_slips', function($table)
{
$table->integer('booking_id')->unsigned();
$table->foreign('booking_id')->references('id')->on('bookings');
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
//
}
}
@@ -0,0 +1,33 @@
<?php
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class RenameBookingForeignkeyInPoTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::table('purchase_orders', function($table)
{
$table->dropForeign('book_id');
$table->integer('booking_id')->unsigned();
$table->foreign('booking_id')->references('id')->on('bookings');
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
//
}
}
+1 -1
View File
@@ -17,6 +17,6 @@ class DatabaseSeeder extends Seeder
$this->call(UserRoleSeeder::class);
$this->call(RateTableSeeder::class);
$this->call(BookTableSeeder::class);
$this->call(SettingCreditSeeder::class);
$this->call(CreditTableSeeder::class);
}
}