65 lines
2.1 KiB
PHP
65 lines
2.1 KiB
PHP
<?php
|
|
|
|
declare(strict_types=1);
|
|
|
|
namespace Database\ArcadiaReplicate\Tables\Refp;
|
|
|
|
use Database\ArcadiaReplicate\IdentifiesTableOrView;
|
|
use Database\ArcadiaReplicate\TableOrView;
|
|
use Illuminate\Database\Schema\Blueprint;
|
|
use Illuminate\Database\Schema\Builder;
|
|
|
|
/**
|
|
* Schéma Oracle : REFP.NDP
|
|
* Type : TABLE
|
|
* Description : Réplication miroir pour NDP
|
|
*/
|
|
final class NdpTable implements TableOrView
|
|
{
|
|
use IdentifiesTableOrView;
|
|
|
|
public static function schemaName(): string
|
|
{
|
|
return 'REFP';
|
|
}
|
|
|
|
public static function name(): string
|
|
{
|
|
return 'NDP';
|
|
}
|
|
|
|
public static function isView(): bool
|
|
{
|
|
return false;
|
|
}
|
|
|
|
public static function description(): string
|
|
{
|
|
return 'Objet miroir TABLE REFP.NDP du métamodèle Arcadia.';
|
|
}
|
|
|
|
public static function up(Builder $schema): void
|
|
{
|
|
if (app()->environment('local', 'testing')) {
|
|
$schema->dropIfExists(self::table($schema->getConnection()));
|
|
}
|
|
|
|
$schema->create(self::table($schema->getConnection()), function (Blueprint $table): void {
|
|
$table->string('COD_NDP', 100)->primary()->comment('Oracle: VARCHAR2(0, 0) [PK]');
|
|
$table->text('LIB_NDP')->nullable()->comment('Oracle: VARCHAR2(0, 0)');
|
|
$table->bigInteger('UVERSION')->nullable()->comment('Oracle: NUMBER(0, 0)');
|
|
$table->text('LIB2_NDP')->nullable()->comment('Oracle: VARCHAR2(0, 0)');
|
|
$table->text('LIB3_NDP')->nullable()->comment('Oracle: VARCHAR2(0, 0)');
|
|
$table->text('LIB4_NDP')->nullable()->comment('Oracle: VARCHAR2(0, 0)');
|
|
$table->decimal('TAUX_REST_MC', 16, 6)->nullable()->comment('Oracle: NUMBER(16, 6)');
|
|
$table->boolean('COD_UTE')->nullable()->comment('Oracle: NUMBER(1, 0)');
|
|
$table->integer('CHAPITRE')->nullable()->comment('Oracle: NUMBER(5, 0)');
|
|
$table->boolean('IS_ACTIF')->nullable()->comment('Oracle: NUMBER(1, 0)');
|
|
});
|
|
}
|
|
|
|
public static function down(Builder $schema): void
|
|
{
|
|
$schema->dropIfExists(self::table($schema->getConnection()));
|
|
}
|
|
}
|