Merge branch 'dillon/90-e-invoice-e' into vapor/development

This commit is contained in:
Dillon Ngo
2026-01-31 22:10:38 +08:00
2 changed files with 76 additions and 0 deletions
@@ -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');
});
}
}
@@ -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');
});
}
}