Merge remote-tracking branch 'composer/master'
This commit is contained in:
@@ -30,16 +30,4 @@
|
||||
'trans_status',
|
||||
'proc_code',
|
||||
];
|
||||
|
||||
/**
|
||||
* The attributes that should be cast.
|
||||
*
|
||||
* @var array<string, string>
|
||||
*/
|
||||
protected $casts = [
|
||||
'booking_date' => 'datetime',
|
||||
'value_date' => 'datetime',
|
||||
'txn_amount' => 'decimal:2',
|
||||
'chrg_amount' => 'decimal:2',
|
||||
];
|
||||
}
|
||||
|
||||
@@ -61,14 +61,4 @@
|
||||
'co_code',
|
||||
'date_time'
|
||||
];
|
||||
|
||||
protected $casts = [
|
||||
'amount_lcy' => 'decimal:2',
|
||||
'amount_fcy' => 'decimal:2',
|
||||
'exchange_rate' => 'decimal:6',
|
||||
'value_date' => 'date',
|
||||
'exposure_date' => 'date',
|
||||
'accounting_date' => 'date',
|
||||
'date_time' => 'datetime'
|
||||
];
|
||||
}
|
||||
|
||||
@@ -49,13 +49,4 @@
|
||||
'txn_code_cr',
|
||||
'txn_code_dr',
|
||||
];
|
||||
|
||||
/**
|
||||
* The attributes that should be cast.
|
||||
*
|
||||
* @var array<string, string>
|
||||
*/
|
||||
protected $casts = [
|
||||
'date_time' => 'datetime',
|
||||
];
|
||||
}
|
||||
|
||||
@@ -0,0 +1,32 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
return new class extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
* Change date_of_birth column from date to string type
|
||||
*/
|
||||
public function up(): void
|
||||
{
|
||||
Schema::table('customers', function (Blueprint $table) {
|
||||
// First modify the column to string type
|
||||
$table->string('date_of_birth')->nullable()->change();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
* Change date_of_birth column back to date type
|
||||
*/
|
||||
public function down(): void
|
||||
{
|
||||
Schema::table('customers', function (Blueprint $table) {
|
||||
// Convert back to date type
|
||||
$table->date('date_of_birth')->nullable()->change();
|
||||
});
|
||||
}
|
||||
};
|
||||
@@ -0,0 +1,45 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
return new class extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
* Change date fields to string type in accounts table
|
||||
*/
|
||||
public function up(): void
|
||||
{
|
||||
Schema::table('accounts', function (Blueprint $table) {
|
||||
// Change opening_date from date to string
|
||||
$table->string('opening_date')->nullable()->change();
|
||||
|
||||
// Change closure_date from date to string
|
||||
$table->string('closure_date')->nullable()->change();
|
||||
|
||||
// Fix the start_year_bal column which has incorrect parameters
|
||||
// First drop the column
|
||||
$table->string('start_year_bal',255)->nullable()->change();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
* Change string fields back to date type
|
||||
*/
|
||||
public function down(): void
|
||||
{
|
||||
Schema::table('accounts', function (Blueprint $table) {
|
||||
// Change opening_date back to date
|
||||
$table->date('opening_date')->nullable()->change();
|
||||
|
||||
// Change closure_date back to date
|
||||
$table->date('closure_date')->nullable()->change();
|
||||
|
||||
// Drop and recreate start_year_bal with original definition
|
||||
$table->string('start_year_bal',15)->nullable()->change();
|
||||
});
|
||||
}
|
||||
};
|
||||
@@ -0,0 +1,32 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
return new class extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
* Change date_time column from dateTime to string type
|
||||
*/
|
||||
public function up(): void
|
||||
{
|
||||
Schema::table('ft_txn_type_condition', function (Blueprint $table) {
|
||||
// Change date_time from dateTime to string
|
||||
$table->string('date_time')->nullable()->change();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
* Change date_time column back to dateTime type
|
||||
*/
|
||||
public function down(): void
|
||||
{
|
||||
Schema::table('ft_txn_type_condition', function (Blueprint $table) {
|
||||
// Change date_time back to dateTime
|
||||
$table->dateTime('date_time')->nullable()->change();
|
||||
});
|
||||
}
|
||||
};
|
||||
@@ -0,0 +1,42 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
return new class extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
* Change date and dateTime fields to string type in data_captures table
|
||||
*/
|
||||
public function up(): void
|
||||
{
|
||||
Schema::table('data_captures', function (Blueprint $table) {
|
||||
// Change date fields to string
|
||||
$table->string('value_date')->nullable()->change();
|
||||
$table->string('exposure_date')->nullable()->change();
|
||||
$table->string('accounting_date')->nullable()->change();
|
||||
|
||||
// Change dateTime field to string
|
||||
$table->string('date_time')->nullable()->change();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
* Change string fields back to date and dateTime types
|
||||
*/
|
||||
public function down(): void
|
||||
{
|
||||
Schema::table('data_captures', function (Blueprint $table) {
|
||||
// Change string fields back to date
|
||||
$table->date('value_date')->nullable()->change();
|
||||
$table->date('exposure_date')->nullable()->change();
|
||||
$table->date('accounting_date')->nullable()->change();
|
||||
|
||||
// Change string field back to dateTime
|
||||
$table->dateTime('date_time')->nullable()->change();
|
||||
});
|
||||
}
|
||||
};
|
||||
@@ -0,0 +1,36 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
return new class extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
* Change decimal fields to string type in data_captures table
|
||||
*/
|
||||
public function up(): void
|
||||
{
|
||||
Schema::table('data_captures', function (Blueprint $table) {
|
||||
// Change decimal fields to string
|
||||
$table->string('amount_lcy')->nullable()->change();
|
||||
$table->string('amount_fcy')->nullable()->change();
|
||||
$table->string('exchange_rate')->nullable()->change();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
* Change string fields back to decimal types
|
||||
*/
|
||||
public function down(): void
|
||||
{
|
||||
Schema::table('data_captures', function (Blueprint $table) {
|
||||
// Change string fields back to decimal with original precision and scale
|
||||
$table->decimal('amount_lcy', 20, 2)->nullable()->change();
|
||||
$table->decimal('amount_fcy', 20, 2)->nullable()->change();
|
||||
$table->decimal('exchange_rate', 20, 6)->nullable()->change();
|
||||
});
|
||||
}
|
||||
};
|
||||
@@ -0,0 +1,34 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
return new class extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
* Change date fields to string type in temp_arrangements table
|
||||
*/
|
||||
public function up(): void
|
||||
{
|
||||
Schema::table('temp_arrangements', function (Blueprint $table) {
|
||||
// Change date fields to string
|
||||
$table->string('orig_contract_date')->nullable()->change();
|
||||
$table->string('start_date')->nullable()->change();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
* Change string fields back to date type
|
||||
*/
|
||||
public function down(): void
|
||||
{
|
||||
Schema::table('temp_arrangements', function (Blueprint $table) {
|
||||
// Change string fields back to date
|
||||
$table->date('orig_contract_date')->nullable()->change();
|
||||
$table->date('start_date')->nullable()->change();
|
||||
});
|
||||
}
|
||||
};
|
||||
Reference in New Issue
Block a user