From ac0580f8fa6fb4c8d01a98870454579eafd2635c Mon Sep 17 00:00:00 2001 From: alissonalbuquerque Date: Wed, 29 Jun 2022 22:13:27 -0300 Subject: [PATCH] =?UTF-8?q?add=20refratora=C3=A7=C3=A3o=20de=20migration?= =?UTF-8?q?=20de=20planejamento?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...345_create_ref_planejamento_ches_table.php | 40 ------------------- ...3_22_113324_create_planejamentos_table.php | 5 +++ 2 files changed, 5 insertions(+), 40 deletions(-) delete mode 100644 database/migrations/2022_03_20_233345_create_ref_planejamento_ches_table.php diff --git a/database/migrations/2022_03_20_233345_create_ref_planejamento_ches_table.php b/database/migrations/2022_03_20_233345_create_ref_planejamento_ches_table.php deleted file mode 100644 index 3b073dd..0000000 --- a/database/migrations/2022_03_20_233345_create_ref_planejamento_ches_table.php +++ /dev/null @@ -1,40 +0,0 @@ -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'); - } -} diff --git a/database/migrations/2022_03_22_113324_create_planejamentos_table.php b/database/migrations/2022_03_22_113324_create_planejamentos_table.php index b2397f4..68ee6dd 100644 --- a/database/migrations/2022_03_22_113324_create_planejamentos_table.php +++ b/database/migrations/2022_03_22_113324_create_planejamentos_table.php @@ -22,6 +22,11 @@ class CreatePlanejamentosTable extends Migration $table->integer('ch_maxima')->nullable(); $table->timestamps(); $table->softDeletes(); + + $table->foreignId('pad_id') + ->constrained('pad') + ->onUpdate('cascade') + ->onDelete('cascade'); }); } -- GitLab