new functionality: Add project coding configuration feature for projects
This commit is contained in:
@@ -0,0 +1,35 @@
|
||||
<?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::create('project_coding_configs', function (Blueprint $table) {
|
||||
$table->id();
|
||||
$table->foreignId('project_id')->constrained()->onDelete('cascade')->unique();
|
||||
$table->string('format')->default('[PROJECT]-[TYPE]-[YEAR]-[SEQUENCE]');
|
||||
$table->json('elements')->nullable(); // Elementos configurados del código
|
||||
$table->integer('next_sequence')->default(1);
|
||||
$table->string('year_format')->default('Y'); // Y, y, YY, yyyy
|
||||
$table->string('separator')->default('-');
|
||||
$table->integer('sequence_length')->default(4);
|
||||
$table->boolean('auto_generate')->default(true);
|
||||
$table->timestamps();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*/
|
||||
public function down(): void
|
||||
{
|
||||
Schema::dropIfExists('project_coding_configs');
|
||||
}
|
||||
};
|
||||
Reference in New Issue
Block a user