mirror of
https://gitlab.com/CIEFWorldwideSdnBhd/exchange-2.0.git
synced 2026-08-19 04:23:55 +00:00
Merge branch 'dillon/90-e-invoice-e' into vapor/development
This commit is contained in:
+42
@@ -0,0 +1,42 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
class RemoveIsInvoiceGeneratedFromBookingsTable extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::table('bookings', function (Blueprint $table) {
|
||||
// Drop the index first
|
||||
$table->dropIndex('bookings_is_invoice_generated_index');
|
||||
|
||||
// Then drop the column
|
||||
$table->dropColumn('is_invoice_generated');
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::table('bookings', function (Blueprint $table) {
|
||||
// Re-add the column
|
||||
$table->boolean('is_invoice_generated')
|
||||
->default(false)
|
||||
->after('status');
|
||||
|
||||
// Recreate the index
|
||||
$table->index('is_invoice_generated', 'bookings_is_invoice_generated_index');
|
||||
});
|
||||
}
|
||||
}
|
||||
+34
@@ -0,0 +1,34 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
class RemoveIsInvoiceGeneratedFromBookingLogsTable extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::table('booking_logs', function (Blueprint $table) {
|
||||
$table->dropColumn('is_invoice_generated');
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::table('booking_logs', function (Blueprint $table) {
|
||||
$table->boolean('is_invoice_generated')
|
||||
->default(false)
|
||||
->after('status');
|
||||
});
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user