mirror of
https://gitlab.com/CIEFWorldwideSdnBhd/exchange-2.0.git
synced 2026-08-21 21:43:57 +00:00
Update: laravel 8 to 12, php 7.3 to php 8.3, Jenkinsfile, Unit/Feature testing, vapor, docker
This commit is contained in:
@@ -20,7 +20,7 @@ class CreateBookingsTable extends Migration
|
||||
$table->string('marking')->unique();
|
||||
$table->foreignId('service_id')->unsigned();
|
||||
$table->foreignId('bank_id')->unsigned();
|
||||
$table->float('fix_amount', 20, 5);
|
||||
$table->decimal('fix_amount', 20, 5);
|
||||
$table->foreignId('fix_currency_id')->unsigned();
|
||||
$table->foreignId('convertible_currency_id')->unsigned();
|
||||
$table->foreignId('conversion_currency_id')->unsigned();
|
||||
|
||||
@@ -24,7 +24,7 @@ class CreateStatementTransactionsTable extends Migration
|
||||
$table->string('transaction_description_4')->nullable();
|
||||
$table->string('transaction_description_5')->nullable();
|
||||
$table->string('transaction_ref')->nullable();
|
||||
$table->float('amount', 15, 2)->unsigned(false);
|
||||
$table->decimal('amount', 15, 2)->unsigned(false);
|
||||
$table->string('teller_id')->nullable();
|
||||
$table->string('branch_channel');
|
||||
$table->string('transaction_code');
|
||||
|
||||
@@ -13,11 +13,13 @@ class AddInvoiceStatusToBookingLogsTable extends Migration
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::table('booking_logs', function (Blueprint $table) {
|
||||
$table->boolean('invoice_status')
|
||||
->default(false)
|
||||
->after('status');
|
||||
});
|
||||
if (Schema::hasTable('booking_logs')) {
|
||||
Schema::table('booking_logs', function (Blueprint $table) {
|
||||
$table->boolean('invoice_status')
|
||||
->default(false)
|
||||
->after('status');
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -27,8 +29,10 @@ class AddInvoiceStatusToBookingLogsTable extends Migration
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::table('booking_logs', function (Blueprint $table) {
|
||||
$table->dropColumn('invoice_status');
|
||||
});
|
||||
if (Schema::hasTable('booking_logs')) {
|
||||
Schema::table('booking_logs', function (Blueprint $table) {
|
||||
$table->dropColumn('invoice_status');
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+12
-8
@@ -13,11 +13,13 @@ class AddIsInvoiceGeneratedToBookingLogsTable extends Migration
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::table('booking_logs', function (Blueprint $table) {
|
||||
$table->boolean('is_invoice_generated')
|
||||
->default(false)
|
||||
->after('status');
|
||||
});
|
||||
if (Schema::hasTable('booking_logs')) {
|
||||
Schema::table('booking_logs', function (Blueprint $table) {
|
||||
$table->boolean('is_invoice_generated')
|
||||
->default(false)
|
||||
->after('status');
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -27,8 +29,10 @@ class AddIsInvoiceGeneratedToBookingLogsTable extends Migration
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::table('booking_logs', function (Blueprint $table) {
|
||||
$table->dropColumn('is_invoice_generated');
|
||||
});
|
||||
if (Schema::hasTable('booking_logs')) {
|
||||
Schema::table('booking_logs', function (Blueprint $table) {
|
||||
$table->dropColumn('is_invoice_generated');
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+12
-8
@@ -13,9 +13,11 @@ class RemoveIsInvoiceGeneratedFromBookingLogsTable extends Migration
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::table('booking_logs', function (Blueprint $table) {
|
||||
$table->dropColumn('is_invoice_generated');
|
||||
});
|
||||
if (Schema::hasTable('booking_logs')) {
|
||||
Schema::table('booking_logs', function (Blueprint $table) {
|
||||
$table->dropColumn('is_invoice_generated');
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -25,10 +27,12 @@ class RemoveIsInvoiceGeneratedFromBookingLogsTable extends Migration
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::table('booking_logs', function (Blueprint $table) {
|
||||
$table->boolean('is_invoice_generated')
|
||||
->default(false)
|
||||
->after('status');
|
||||
});
|
||||
if (Schema::hasTable('booking_logs')) {
|
||||
Schema::table('booking_logs', function (Blueprint $table) {
|
||||
$table->boolean('is_invoice_generated')
|
||||
->default(false)
|
||||
->after('status');
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+30
@@ -0,0 +1,30 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
return new class extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*/
|
||||
public function up(): void
|
||||
{
|
||||
Schema::table('activity_log', function (Blueprint $table) {
|
||||
$table->uuid('batch_uuid')->nullable()->after('properties');
|
||||
$table->string('event')->nullable()->after('subject_type');
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*/
|
||||
public function down(): void
|
||||
{
|
||||
Schema::table('activity_log', function (Blueprint $table) {
|
||||
$table->dropColumn('batch_uuid');
|
||||
$table->dropColumn('event');
|
||||
});
|
||||
}
|
||||
};
|
||||
+36
@@ -0,0 +1,36 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Support\Facades\DB;
|
||||
|
||||
return new class extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
* Update all roles (id 1 & 2) and all permissions to use 'api' guard_name
|
||||
* instead of 'web', to align with Spatie Laravel Permission v7 strict
|
||||
* guard matching behaviour for SPA/API-based requests.
|
||||
*/
|
||||
public function up(): void
|
||||
{
|
||||
DB::table('roles')->where('id', 1)->update(['guard_name' => 'api']);
|
||||
DB::table('roles')->where('id', 2)->update(['guard_name' => 'api']);
|
||||
DB::table('permissions')->where('id', '>', 0)->update(['guard_name' => 'api']);
|
||||
|
||||
// Clear Spatie permission cache so changes take effect immediately
|
||||
app()['cache']->forget('spatie.permission.cache');
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*/
|
||||
public function down(): void
|
||||
{
|
||||
DB::table('roles')->where('id', 1)->update(['guard_name' => 'web']);
|
||||
DB::table('roles')->where('id', 2)->update(['guard_name' => 'web']);
|
||||
DB::table('permissions')->where('id', '>', 0)->update(['guard_name' => 'web']);
|
||||
|
||||
// Clear Spatie permission cache so rollback takes effect immediately
|
||||
app()['cache']->forget('spatie.permission.cache');
|
||||
}
|
||||
};
|
||||
Reference in New Issue
Block a user