Fix some error due to update migration

This commit is contained in:
Too
2018-06-28 16:11:49 +08:00
parent 81a5a46d36
commit 63dce18675
14 changed files with 170 additions and 28 deletions
@@ -30,6 +30,6 @@ class CreateUsersTable extends Migration
*/
public function down()
{
Schema::dropIfExists('users');
// Schema::dropIfExists('users');
}
}
@@ -32,6 +32,6 @@ class CreateRatesTable extends Migration
*/
public function down()
{
Schema::dropIfExists('rates');
// Schema::dropIfExists('rates');
}
}
@@ -42,7 +42,6 @@ class CreateBookingsTable extends Migration
*/
public function down()
{
Schema::dropIfExists('bookings');
// Schema::dropIfExists('bookings');
}
}
@@ -15,7 +15,8 @@ class RenameBookingForeignkeyInPoTable extends Migration
{
Schema::table('purchase_orders', function($table)
{
$table->dropForeign('book_id');
$table->dropForeign('purchase_orders_book_id_foreign');
$table->dropColumn('book_id');
$table->integer('booking_id')->unsigned();
$table->foreign('booking_id')->references('id')->on('bookings');
});
+1 -2
View File
@@ -16,7 +16,6 @@ class DatabaseSeeder extends Seeder
$this->call(RolesAndPermissionsSeeder::class);
$this->call(UserRoleSeeder::class);
$this->call(RateTableSeeder::class);
$this->call(BookTableSeeder::class);
$this->call(CreditTableSeeder::class);
$this->call(BookTableSeeder::class);
}
}