Commit ac0580f8 authored by alissonalbuquerque's avatar alissonalbuquerque
Browse files

add refratoração de migration de planejamento

parent 193316f7
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
class CreateRefPlanejamentoChesTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('ref_planejamento_ches', function (Blueprint $table) {
$table->id();
$table->timestamps();
$table->string("descricao_atividade", 50);
$table->float("ch_semanal", 5, 2);
$table->float("ch_maxima", 5, 2);
$table->foreignId('PAD_id')
->constrained('pads')
->onUpdate('cascade')
->onDelete('cascade');
$table->softDeletes();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('ref_planejamento_ches');
}
}
...@@ -22,6 +22,11 @@ class CreatePlanejamentosTable extends Migration ...@@ -22,6 +22,11 @@ class CreatePlanejamentosTable extends Migration
$table->integer('ch_maxima')->nullable(); $table->integer('ch_maxima')->nullable();
$table->timestamps(); $table->timestamps();
$table->softDeletes(); $table->softDeletes();
$table->foreignId('pad_id')
->constrained('pad')
->onUpdate('cascade')
->onDelete('cascade');
}); });
} }
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment