mejoras en la gestión de nombres y códigos de proyectos y documentos según la norma ISO 19650
Some checks failed
linter / quality (push) Has been cancelled
tests / ci (push) Has been cancelled

This commit is contained in:
2025-10-25 11:30:59 +02:00
parent d8ae8c8894
commit 88e526cf6c
13 changed files with 917 additions and 46 deletions

View File

@@ -12,6 +12,7 @@ return new class extends Migration
public function up(): void
{
Schema::table('projects', function (Blueprint $table) {
$table->string('reference', 12)->nullable()->after('id')->uniqidue();
$table->string('status')->nullable();
$table->string('project_image_path')->nullable();
$table->string('address')->nullable();
@@ -33,6 +34,7 @@ return new class extends Migration
public function down(): void
{
Schema::table('documents', function (Blueprint $table) {
$table->dropColumn('reference');
$table->dropColumn('status');
$table->dropColumn('project_image_path');
$table->dropColumn('address');

View File

@@ -1,28 +0,0 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
return new class extends Migration
{
/**
* Run the migrations.
*/
public function up(): void
{
Schema::table('projects', function (Blueprint $table) {
$table->string('reference')->nullable()->after('id')->uniqidue();
});
}
/**
* Reverse the migrations.
*/
public function down(): void
{
Schema::table('projects', function (Blueprint $table) {
$table->dropColumn('reference');
});
}
};

View File

@@ -0,0 +1,34 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
return new class extends Migration
{
/**
* Run the migrations.
*/
public function up(): void
{
Schema::table('documents', function (Blueprint $table) {
$table->string('code')->before('name');
$table->string('revision')->nullable();
$table->string('version')->nullable();
$table->string('discipline')->nullable();
$table->string('document_type')->nullable();
$table->string('issuer')->nullable();
$table->date('entry_date')->nullable();
});
}
/**
* Reverse the migrations.
*/
public function down(): void
{
Schema::table('documents', function (Blueprint $table) {
$table->dropColumn(['code', 'revision', 'version', 'discipline', 'document_type', 'issuer', 'entry_date']);
});
}
};