feat(scanner): add scanner category validation logic and related tests

This commit is contained in:
2026-08-13 11:26:13 -03:00
parent 329e0b1953
commit a2592987f5
12 changed files with 216 additions and 17 deletions

View File

@@ -0,0 +1,31 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\DB;
use Illuminate\Support\Facades\Schema;
return new class extends Migration
{
private const DESFILE_TENANT_CODE = 'desfile_pura_tendencia';
public function up(): void
{
Schema::table('tenants', function (Blueprint $table): void {
$table->boolean('scanner_category_validation_enabled')
->default(true)
->after('display_cart');
});
DB::table('tenants')
->where('codigo', self::DESFILE_TENANT_CODE)
->update(['scanner_category_validation_enabled' => false]);
}
public function down(): void
{
Schema::table('tenants', function (Blueprint $table): void {
$table->dropColumn('scanner_category_validation_enabled');
});
}
};