This commit is contained in:
Juan Felipe Duarte
2025-06-14 09:03:54 -07:00
parent 14d6665253
commit 6789ce3fb3
5 changed files with 64 additions and 30 deletions
@@ -0,0 +1,23 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
return new class extends Migration
{
public function up()
{
Schema::table('users', function (Blueprint $table) {
$table->string('subvendedor_id')->nullable()->after('visto');
$table->boolean('subvendedor')->default(true)->after('subvendedor_id');
});
}
public function down()
{
Schema::table('users', function (Blueprint $table) {
$table->dropColumn(['subvendedor_id', 'subvendedor']);
});
}
};
@@ -0,0 +1,22 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
return new class extends Migration
{
public function up()
{
Schema::table('roles', function (Blueprint $table) {
$table->string('subvendedor_id')->nullable()->after('nombre');
});
}
public function down()
{
Schema::table('roles', function (Blueprint $table) {
$table->dropColumn('subvendedor_id');
});
}
};