diff --git a/database/migrations/2022_10_19_210913_create_objetivo_de_desenvolvimento_sustentavels_table.php b/database/migrations/2022_10_19_210913_create_objetivo_de_desenvolvimento_sustentavels_table.php new file mode 100644 index 0000000000000000000000000000000000000000..83023841d9b6be06b0e565e47bf721053aae6483 --- /dev/null +++ b/database/migrations/2022_10_19_210913_create_objetivo_de_desenvolvimento_sustentavels_table.php @@ -0,0 +1,33 @@ +<?php + +use Illuminate\Database\Migrations\Migration; +use Illuminate\Database\Schema\Blueprint; +use Illuminate\Support\Facades\Schema; + +class CreateObjetivoDeDesenvolvimentoSustentavelsTable extends Migration +{ + /** + * Run the migrations. + * + * @return void + */ + public function up() + { + Schema::create('objetivo_de_desenvolvimento_sustentavels', function (Blueprint $table) { + $table->bigIncrements('id'); + $table->string('nome'); + + $table->timestamps(); + }); + } + + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + Schema::dropIfExists('objetivo_de_desenvolvimento_sustentavels'); + } +} diff --git a/database/migrations/2022_10_19_212007_create_objetivo_de_desenvolvimento_sustentavel_trabalhos_table.php b/database/migrations/2022_10_19_212007_create_objetivo_de_desenvolvimento_sustentavel_trabalhos_table.php new file mode 100644 index 0000000000000000000000000000000000000000..df3c29cbc4c69960ac1f9ba57d8ced28c5e08ed0 --- /dev/null +++ b/database/migrations/2022_10_19_212007_create_objetivo_de_desenvolvimento_sustentavel_trabalhos_table.php @@ -0,0 +1,36 @@ +<?php + +use Illuminate\Database\Migrations\Migration; +use Illuminate\Database\Schema\Blueprint; +use Illuminate\Support\Facades\Schema; + +class CreateObjetivoDeDesenvolvimentoSustentavelTrabalhosTable extends Migration +{ + /** + * Run the migrations. + * + * @return void + */ + public function up() + { + Schema::create('objetivo_de_desenvolvimento_sustentavel_trabalhos', function (Blueprint $table) { + $table->bigIncrements('id'); + $table->integer('objetivo_de_desenvolvimento_sustentavel_id'); + $table->foreign('objetivo_de_desenvolvimento_sustentavel_id')->references('id')->on('objetivo_de_desenvolvimento_sustentavels'); + + $table->integer('trabalho_id'); + $table->foreign('trabalho_id')->references('id')->on('trabalhos'); + $table->timestamps(); + }); + } + + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + Schema::dropIfExists('ods_trabalhos'); + } +}