mejoras en la gestión de nombres y códigos de proyectos y documentos según la norma ISO 19650
This commit is contained in:
@@ -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');
|
||||
|
||||
@@ -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');
|
||||
});
|
||||
}
|
||||
};
|
||||
@@ -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']);
|
||||
});
|
||||
}
|
||||
};
|
||||
Reference in New Issue
Block a user