Files
lpj/database/migrations/2024_11_01_023117_update_debitures_table.php
Daeng Deni Mardaeni 5201cdb0e3 Drop unique constraint on 'cif' in debitures table
Remove the unique constraint on the 'cif' field in the debitures table and refactor the `UniqueCifExceptZero` validation rule to handle the uniqueness check more robustly. Also, add an unused import statement for `UniqueExcept` in `DebitureRequest`.
2024-11-01 09:39:41 +07:00

29 lines
604 B
PHP

<?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('debitures', function (Blueprint $table) {
$table->dropUnique(['cif']);
});
}
/**
* Reverse the migrations.
*/
public function down(): void
{
Schema::table('debitures', function (Blueprint $table) {
$table->string('cif')->unique()->change();
});
}
};