revised form up country (again)
This commit is contained in:
@@ -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.
|
||||
*/
|
||||
public function up(): void
|
||||
{
|
||||
Schema::table('form_up_country', function (Blueprint $table) {
|
||||
$table->integer('allowance')->nullable()->change();
|
||||
$table->integer('transport_dalkot')->nullable()->change();
|
||||
$table->integer('transport_ankot')->nullable()->change();
|
||||
$table->integer('hotel')->nullable()->change();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*/
|
||||
public function down(): void
|
||||
{
|
||||
Schema::table('form_up_country', function (Blueprint $table) {
|
||||
$table->integer('allowance')->nullable(false)->change();
|
||||
$table->integer('transport_dalkot')->nullable(false)->change();
|
||||
$table->integer('transport_ankot')->nullable(false)->change();
|
||||
$table->integer('hotel')->nullable(false)->change();
|
||||
});
|
||||
}
|
||||
};
|
||||
@@ -0,0 +1,44 @@
|
||||
<?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('form_up_country', function (Blueprint $table) {
|
||||
// drop old bukti columns
|
||||
$table->dropColumn('bukti1');
|
||||
$table->dropColumn('bukti2');
|
||||
$table->dropColumn('bukti3');
|
||||
|
||||
$table->string('bukti_allowance')->after('approved_total')->nullable();
|
||||
$table->string('bukti_transport_dalkot')->after('bukti_allowance')->nullable();
|
||||
$table->string('bukti_transport_ankot')->after('bukti_transport_dalkot')->nullable();
|
||||
$table->string('bukti_hotel')->after('bukti_transport_ankot')->nullable();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*/
|
||||
public function down(): void
|
||||
{
|
||||
Schema::table('form_up_country', function (Blueprint $table) {
|
||||
// drop new bukti columns
|
||||
$table->dropColumn('bukti_allowance');
|
||||
$table->dropColumn('bukti_transport_dalkot');
|
||||
$table->dropColumn('bukti_transport_ankot');
|
||||
$table->dropColumn('bukti_hotel');
|
||||
|
||||
$table->string('bukti1')->after('approved_total')->nullable()->change();
|
||||
$table->string('bukti2')->after('bukti1')->nullable()->change();
|
||||
$table->string('bukti3')->after('bukti2')->nullable()->change();
|
||||
});
|
||||
}
|
||||
};
|
||||
Reference in New Issue
Block a user