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.VISUEL_EXPORT_GENFI
|
|
|
|
|
* Type : VIEW
|
|
|
|
|
* Description : Réplication miroir pour VISUEL_EXPORT_GENFI
|
|
|
|
|
*/
|
|
|
|
|
final class VisuelExportGenfiView 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 'VISUEL_EXPORT_GENFI';
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public static function isView(): bool
|
|
|
|
|
{
|
|
|
|
|
return true;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public static function description(): string
|
|
|
|
|
{
|
|
|
|
|
return 'Objet miroir VIEW REFP.VISUEL_EXPORT_GENFI 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->unsignedBigInteger('NO_ART')->comment('Oracle: NUMBER(10, 0) [PK]');
|
|
|
|
|
$table->unsignedBigInteger('CODE_VISUEL')->comment('Oracle: NUMBER(10, 0) [PK]');
|
|
|
|
|
$table->unsignedBigInteger('CODE_TYPEVUE')->nullable()->comment('Oracle: NUMBER(10, 0)');
|
|
|
|
|
$table->boolean('COPYRIGHT')->nullable()->comment('Oracle: NUMBER(1, 0)');
|
|
|
|
|
$table->integer('LANGUE')->nullable()->comment('Oracle: NUMBER(5, 0)');
|
|
|
|
|
$table->bigInteger('ORDRE')->nullable()->comment('Oracle: NUMBER(0, 0)');
|
|
|
|
|
$table->text('FILENAME')->nullable()->comment('Oracle: VARCHAR2(0, 0)');
|
|
|
|
|
$table->integer('UVERSION')->nullable()->comment('Oracle: NUMBER(5, 0)');
|
|
|
|
|
$table->primary(['NO_ART', 'CODE_VISUEL']);
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
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
|
|
|
}
|
|
|
|
|
}
|