67 lines
2.3 KiB
PHP
67 lines
2.3 KiB
PHP
<?php
|
|
|
|
declare(strict_types=1);
|
|
|
|
namespace Database\ArcadiaReplicate\Views\Refp;
|
|
|
|
use Database\ArcadiaReplicate\IdentifiesTableOrView;
|
|
use Database\ArcadiaReplicate\TableOrView;
|
|
use Illuminate\Database\Schema\Blueprint;
|
|
use Illuminate\Database\Schema\Builder;
|
|
|
|
/**
|
|
* Schéma Oracle : REFP.SIT_PROD_INCO
|
|
* Type : VIEW
|
|
* Description : Réplication miroir pour SIT_PROD_INCO
|
|
*/
|
|
final class SitProdIncoView implements TableOrView
|
|
{
|
|
use IdentifiesTableOrView;
|
|
|
|
public static function schemaName(): string
|
|
{
|
|
return 'REFP';
|
|
}
|
|
|
|
public static function name(): string
|
|
{
|
|
return 'SIT_PROD_INCO';
|
|
}
|
|
|
|
public static function isView(): bool
|
|
{
|
|
return true;
|
|
}
|
|
|
|
public static function description(): string
|
|
{
|
|
return 'Objet miroir VIEW REFP.SIT_PROD_INCO 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->unsignedBigInteger('NO_ART')->nullable()->comment('Oracle: NUMBER(10, 0)');
|
|
$table->bigInteger('COD_SITE_GRP')->nullable()->comment('Oracle: NUMBER(0, 0)');
|
|
$table->text('NOM_SITE')->nullable()->comment('Oracle: VARCHAR2(0, 0)');
|
|
$table->text('ADRESSE_1')->nullable()->comment('Oracle: VARCHAR2(0, 0)');
|
|
$table->text('ADRESSE_2')->nullable()->comment('Oracle: VARCHAR2(0, 0)');
|
|
$table->text('NUM_AGREMENT')->nullable()->comment('Oracle: VARCHAR2(0, 0)');
|
|
$table->text('COD_EMBAL')->nullable()->comment('Oracle: VARCHAR2(0, 0)');
|
|
$table->text('CERTIFICATION')->nullable()->comment('Oracle: VARCHAR2(0, 0)');
|
|
$table->unsignedBigInteger('COD_SOCIETE')->nullable()->comment('Oracle: NUMBER(10, 0)');
|
|
$table->bigInteger('UVERSION')->nullable()->comment('Oracle: NUMBER(0, 0)');
|
|
$table->string('CP', 40)->nullable()->comment('Oracle: VARCHAR2(0, 0)');
|
|
$table->text('VILLE')->nullable()->comment('Oracle: VARCHAR2(0, 0)');
|
|
});
|
|
}
|
|
|
|
public static function down(Builder $schema): void
|
|
{
|
|
$schema->dropIfExists(self::table($schema->getConnection()));
|
|
}
|
|
}
|