67 lines
2.3 KiB
PHP
67 lines
2.3 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.ADDITIF
|
|
* Type : TABLE
|
|
* Description : Réplication miroir pour ADDITIF
|
|
*/
|
|
final class AdditifTable implements TableOrView
|
|
{
|
|
use IdentifiesTableOrView;
|
|
|
|
public static function schemaName(): string
|
|
{
|
|
return 'REFP';
|
|
}
|
|
|
|
public static function name(): string
|
|
{
|
|
return 'ADDITIF';
|
|
}
|
|
|
|
public static function isView(): bool
|
|
{
|
|
return false;
|
|
}
|
|
|
|
public static function description(): string
|
|
{
|
|
return 'Objet miroir TABLE REFP.ADDITIF 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_EUROPEEN', 40)->primary()->comment('Oracle: VARCHAR2(0, 0) [PK]');
|
|
$table->text('MOLECULE')->nullable()->comment('Oracle: VARCHAR2(0, 0)');
|
|
$table->text('CARAC_GEN')->nullable()->comment('Oracle: VARCHAR2(0, 0)');
|
|
$table->smallInteger('RISQUE')->nullable()->comment('Oracle: NUMBER(2, 0)');
|
|
$table->text('COMMENTAIRE')->nullable()->comment('Oracle: VARCHAR2(0, 0)');
|
|
$table->text('FONCTION')->nullable()->comment('Oracle: VARCHAR2(0, 0)');
|
|
$table->unsignedBigInteger('UVERSION')->nullable()->comment('Oracle: NUMBER(10, 0)');
|
|
$table->date('DAT_CRE')->nullable()->comment('Oracle: DATE(0, 0)');
|
|
$table->date('DAT_MAJ')->nullable()->comment('Oracle: DATE(0, 0)');
|
|
$table->boolean('BLACKLIST_LDC')->nullable()->comment('Oracle: NUMBER(1, 0)');
|
|
$table->text('VARIANTE')->nullable()->comment('Oracle: VARCHAR2(0, 0)');
|
|
$table->text('CHAINE_EXCLUS')->nullable()->comment('Oracle: VARCHAR2(0, 0)');
|
|
});
|
|
}
|
|
|
|
public static function down(Builder $schema): void
|
|
{
|
|
$schema->dropIfExists(self::table($schema->getConnection()));
|
|
}
|
|
}
|