63 lines
1.9 KiB
PHP
63 lines
1.9 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.INCO_VERSION
|
|
* Type : TABLE
|
|
* Description : Réplication miroir pour INCO_VERSION
|
|
*/
|
|
final class IncoVersionTable implements TableOrView
|
|
{
|
|
use IdentifiesTableOrView;
|
|
|
|
public static function schemaName(): string
|
|
{
|
|
return 'REFP';
|
|
}
|
|
|
|
public static function name(): string
|
|
{
|
|
return 'INCO_VERSION';
|
|
}
|
|
|
|
public static function isView(): bool
|
|
{
|
|
return false;
|
|
}
|
|
|
|
public static function description(): string
|
|
{
|
|
return 'Objet miroir TABLE REFP.INCO_VERSION 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->date('DAT_CRE')->nullable()->comment('Oracle: DATE(0, 0)');
|
|
$table->date('DAT_MAJ')->nullable()->comment('Oracle: DATE(0, 0)');
|
|
$table->integer('UVERSION')->nullable()->comment('Oracle: NUMBER(5, 0)');
|
|
$table->bigInteger('NO_ART')->comment('Oracle: NUMBER(0, 0) [PK]');
|
|
$table->unsignedBigInteger('NO_VERSION')->comment('Oracle: NUMBER(10, 0) [PK]');
|
|
$table->text('COMMENTAIRE')->nullable()->comment('Oracle: VARCHAR2(0, 0)');
|
|
$table->string('COD_UTIL', 36)->nullable()->comment('Oracle: VARCHAR2(0, 0)');
|
|
$table->primary(['NO_ART', 'NO_VERSION']);
|
|
});
|
|
}
|
|
|
|
public static function down(Builder $schema): void
|
|
{
|
|
$schema->dropIfExists(self::table($schema->getConnection()));
|
|
}
|
|
}
|