Columnas a su propia migracion

This commit is contained in:
Alejandro Tasistro 2023-11-12 11:26:29 -03:00
parent e7100121d4
commit 5b2c489f2d
2 changed files with 34 additions and 2 deletions

View File

@ -18,8 +18,6 @@ class CreateSubpedidosTable extends Migration
$table->string('nombre');
$table->foreignId('grupo_de_compra_id');
$table->boolean('aprobado')->default(false);
$table->double('devoluciones_total', 10, 2)->default(0);
$table->string('devoluciones_notas')->default("");
$table->timestamps();
});

View File

@ -0,0 +1,34 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
class DevolucionesPedido extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::table('subpedidos', function (Blueprint $table) {
$table->double('devoluciones_total', 10, 2)->default(0);
$table->string('devoluciones_notas')->default("");
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::table('subpedidos', function (Blueprint $table) {
$table->dropColumn('devoluciones_total');
$table->dropColumn('devoluciones_notas');
});
}
}