Files
CKB/database/migrations/2022_05_25_144502_update_transaction_table.php
2025-05-27 19:09:17 +07:00

37 lines
855 B
PHP

<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
class UpdateTransactionTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::table('transactions', function (Blueprint $table) {
$table->enum('form', ['work', 'wash']);
$table->bigInteger('qty')->unsigned();
$table->renameColumn('tanggal', 'date');
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::table('transactions', function (Blueprint $table) {
$table->dropColumn('form');
$table->dropColumn('qty');
$table->renameColumn('date', 'tanggal');
});
}
}