2026-08-26 15:22:00 +02:00
|
|
|
<?php
|
|
|
|
|
|
|
|
|
|
declare(strict_types=1);
|
|
|
|
|
|
|
|
|
|
namespace Database\ArcadiaReplicate\Views\Refp;
|
|
|
|
|
|
2026-08-31 11:13:34 +02:00
|
|
|
use Database\ArcadiaReplicate\IdentifiesTableOrView;
|
2026-08-26 15:22:00 +02:00
|
|
|
use Database\ArcadiaReplicate\TableOrView;
|
|
|
|
|
use Illuminate\Database\Schema\Blueprint;
|
|
|
|
|
use Illuminate\Database\Schema\Builder;
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Schéma Oracle : REFP.INCO_ARTICLE
|
|
|
|
|
* Type : VIEW
|
|
|
|
|
* Description : Réplication miroir pour INCO_ARTICLE
|
|
|
|
|
*/
|
|
|
|
|
final class IncoArticleView implements TableOrView
|
|
|
|
|
{
|
2026-08-31 11:13:34 +02:00
|
|
|
use IdentifiesTableOrView;
|
|
|
|
|
|
2026-08-26 15:22:00 +02:00
|
|
|
public static function schemaName(): string
|
|
|
|
|
{
|
|
|
|
|
return 'REFP';
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public static function name(): string
|
|
|
|
|
{
|
|
|
|
|
return 'INCO_ARTICLE';
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public static function isView(): bool
|
|
|
|
|
{
|
|
|
|
|
return true;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public static function description(): string
|
|
|
|
|
{
|
|
|
|
|
return 'Objet miroir VIEW REFP.INCO_ARTICLE du métamodèle Arcadia.';
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public static function up(Builder $schema): void
|
|
|
|
|
{
|
|
|
|
|
if (app()->environment('local', 'testing')) {
|
2026-08-31 11:13:34 +02:00
|
|
|
$schema->dropIfExists(self::table($schema->getConnection()));
|
2026-08-26 15:22:00 +02:00
|
|
|
}
|
|
|
|
|
|
2026-08-31 11:13:34 +02:00
|
|
|
$schema->create(self::table($schema->getConnection()), function (Blueprint $table): void {
|
2026-08-26 15:22:00 +02:00
|
|
|
$table->bigInteger('NO_ART')->comment('Oracle: NUMBER(0, 0) [PK]');
|
|
|
|
|
$table->string('LIB_CCIAL', 140)->nullable()->comment('Oracle: VARCHAR2(0, 0)');
|
|
|
|
|
$table->bigInteger('COD_SOC_IA')->comment('Oracle: NUMBER(0, 0) [PK]');
|
|
|
|
|
$table->smallInteger('DLC_CCIAL')->nullable()->comment('Oracle: NUMBER(4, 0)');
|
|
|
|
|
$table->smallInteger('DTS')->nullable()->comment('Oracle: NUMBER(4, 0)');
|
|
|
|
|
$table->smallInteger('DUREE_VIE')->nullable()->comment('Oracle: NUMBER(4, 0)');
|
|
|
|
|
$table->string('ORI_PROD_INCO', 80)->nullable()->comment('Oracle: VARCHAR2(0, 0)');
|
|
|
|
|
$table->unsignedBigInteger('TARE_PRIVE')->nullable()->comment('Oracle: NUMBER(10, 0)');
|
|
|
|
|
$table->decimal('POIDS_MINI', 16, 6)->nullable()->comment('Oracle: NUMBER(16, 6)');
|
|
|
|
|
$table->decimal('POIDS_MAXI', 16, 6)->nullable()->comment('Oracle: NUMBER(16, 6)');
|
|
|
|
|
$table->bigInteger('UVERSION')->nullable()->comment('Oracle: NUMBER(0, 0)');
|
|
|
|
|
$table->decimal('POIDS_MOY_CALCULE', 16, 6)->nullable()->comment('Oracle: NUMBER(16, 6)');
|
|
|
|
|
$table->decimal('LONGUEUR_PRODUIT', 16, 6)->nullable()->comment('Oracle: NUMBER(16, 6)');
|
|
|
|
|
$table->decimal('LARGUEUR_PRODUIT', 16, 6)->nullable()->comment('Oracle: NUMBER(16, 6)');
|
|
|
|
|
$table->decimal('HAUTEUR_PRODUIT', 16, 6)->nullable()->comment('Oracle: NUMBER(16, 6)');
|
|
|
|
|
$table->bigInteger('POIDS_MOY_UNI')->nullable()->comment('Oracle: NUMBER(0, 0)');
|
|
|
|
|
$table->bigInteger('COD_TYP_CONDIT_PUB')->nullable()->comment('Oracle: NUMBER(0, 0)');
|
|
|
|
|
$table->string('COD_NDP', 100)->nullable()->comment('Oracle: VARCHAR2(0, 0)');
|
|
|
|
|
$table->smallInteger('COD_FAMVTE')->nullable()->comment('Oracle: NUMBER(3, 0)');
|
|
|
|
|
$table->string('COD_GENCOD_ADM', 52)->nullable()->comment('Oracle: VARCHAR2(0, 0)');
|
|
|
|
|
$table->string('COD_GENCOD_SYMB', 52)->nullable()->comment('Oracle: VARCHAR2(0, 0)');
|
|
|
|
|
$table->boolean('IS_HALLAL')->nullable()->comment('Oracle: NUMBER(1, 0)');
|
|
|
|
|
$table->text('LIB_CAISSE')->nullable()->comment('Oracle: VARCHAR2(0, 0)');
|
|
|
|
|
$table->bigInteger('COD_MARQUE')->nullable()->comment('Oracle: NUMBER(0, 0)');
|
|
|
|
|
$table->boolean('COD_POID_CST_UVC')->nullable()->comment('Oracle: NUMBER(1, 0)');
|
|
|
|
|
$table->bigInteger('COD_SOUSFAM')->nullable()->comment('Oracle: NUMBER(0, 0)');
|
|
|
|
|
$table->smallInteger('FRAIS_CONGELE')->nullable()->comment('Oracle: NUMBER(2, 0)');
|
|
|
|
|
$table->smallInteger('UTILISABLE_GROUPE')->nullable()->comment('Oracle: NUMBER(2, 0)');
|
|
|
|
|
$table->string('LIB_COMPOSTAGE', 120)->nullable()->comment('Oracle: VARCHAR2(0, 0)');
|
|
|
|
|
$table->unsignedBigInteger('SITE_REF_INCO')->nullable()->comment('Oracle: NUMBER(10, 0)');
|
|
|
|
|
$table->bigInteger('COD_ART_ASSO_COMP')->nullable()->comment('Oracle: NUMBER(0, 0)');
|
|
|
|
|
$table->bigInteger('COD_ART_ASSOCIE')->nullable()->comment('Oracle: NUMBER(0, 0)');
|
|
|
|
|
$table->smallInteger('DLC_RM')->nullable()->comment('Oracle: NUMBER(4, 0)');
|
|
|
|
|
$table->smallInteger('TYPE_PRODUCTION')->nullable()->comment('Oracle: NUMBER(3, 0)');
|
|
|
|
|
$table->smallInteger('CALIBRE_OEUFS')->nullable()->comment('Oracle: NUMBER(3, 0)');
|
|
|
|
|
$table->primary(['NO_ART', 'COD_SOC_IA']);
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public static function down(Builder $schema): void
|
|
|
|
|
{
|
2026-08-31 11:13:34 +02:00
|
|
|
$schema->dropIfExists(self::table($schema->getConnection()));
|
2026-08-26 15:22:00 +02:00
|
|
|
}
|
|
|
|
|
}
|