init commit
All checks were successful
build-api-image / build (push) Successful in 51s

This commit is contained in:
Antonio Lopes dos Santos
2026-08-04 16:52:02 -03:00
commit afec302c3e
11594 changed files with 1636728 additions and 0 deletions

View File

@@ -0,0 +1,36 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
class CreateCadastroGrupoTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('cadastro_grupo', function (Blueprint $table) {
$table->id();
$table->string('nome', 50);
MigrationUtil::addCommonFieldsWithSoftDeletes($table);
$table->unique(['nome', 'deleted_at']);
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('cadastro_grupo');
}
}

View File

@@ -0,0 +1,34 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
class AlterLengthNomeFromCadastroGrupoTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::table('cadastro_grupo', function (Blueprint $table) {
$table->string('nome', 100)->change();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::table('cadastro_grupo', function (Blueprint $table) {
$table->string('nome', 50)->change();
});
}
}

View File

@@ -0,0 +1,35 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
class CreateCadastroGrupoTipoTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('cadastro_grupo_tipo', function (Blueprint $table) {
MigrationUtil::idWithoutIncrements($table);
$table->string('nome', 100);
MigrationUtil::addCommonFields($table, ['staticData' => true]);
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('cadastro_grupo_tipo');
}
}

View File

@@ -0,0 +1,34 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
class AddGrupoTipoIdIntoCadastroGrupoTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::table('cadastro_grupo', function (Blueprint $table) {
$table->foreignId('grupo_tipo_id')->nullable()->constrained('cadastro_grupo_tipo');
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::table('cadastro_grupo', function (Blueprint $table) {
MigrationUtil::dropColumnWithForeign($table, 'grupo_tipo_id');
});
}
}

View File

@@ -0,0 +1,34 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
class AddImpressaoMapaProducaoToCadastroGrupoTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::table('cadastro_grupo', function (Blueprint $table) {
$table->boolean('impressao_mapa_producao')->default(false);
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::table('cadastro_grupo', function (Blueprint $table) {
$table->dropColumn('impressao_mapa_producao');
});
}
}

View File

@@ -0,0 +1,34 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
class AddRegulacaoTipoIdToCadastroGrupoTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::table('cadastro_grupo', function (Blueprint $table) {
$table->foreignId('regulacao_tipo_id')->nullable()->constrained('regulacao_tipo');
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::table('cadastro_grupo', function (Blueprint $table) {
$table->dropConstrainedForeignId('regulacao_tipo_id');
});
}
}