update migration

This commit is contained in:
Jack Goh
2018-08-02 11:02:59 +08:00
parent 1455fb28d7
commit 3539b9076c
4 changed files with 13 additions and 6 deletions
@@ -17,7 +17,7 @@ class RenameBookingForeignkeyFromSupplierbookingTable extends Migration
{
$table->dropForeign(['book_id']);
$table->dropColumn('book_id');
$table->integer('booking_id')->unsigned();
$table->integer('booking_id')->unsigned()->nullable;
$table->foreign('booking_id')->references('id')->on('bookings');
});
}
@@ -26,6 +26,8 @@ class AddBillingFieldToSupplierbookingTable extends Migration
*/
public function down()
{
//
Schema::table('supplier_bookings', function (Blueprint $table) {
$table->dropColumn('billing_amount');
});
}
}
@@ -26,6 +26,8 @@ class AddSalestaxFieldToSupplierbookingTable extends Migration
*/
public function down()
{
//
Schema::table('supplier_bookings', function (Blueprint $table) {
$table->dropColumn('salestax_amount');
});
}
}
@@ -15,7 +15,7 @@ class AddMarkingToUserTable extends Migration
{
Schema::table('users', function($table)
{
$table->string('marking');
$table->string('marking')->nullable();
});
}
@@ -25,7 +25,10 @@ class AddMarkingToUserTable extends Migration
* @return void
*/
public function down()
{
//
{
Schema::table('users', function (Blueprint $table) {
$table->dropColumn('marking');
});
}
}