ldc-arcadia-api/database/arcadia-replicate/Views/Refp/SocDlcIncoView.php

61 lines
1.8 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.SOC_DLC_INCO
* Type : VIEW
* Description : Réplication miroir pour SOC_DLC_INCO
*/
final class SocDlcIncoView implements TableOrView
{
use IdentifiesTableOrView;
public static function schemaName(): string
{
return 'REFP';
}
public static function name(): string
{
return 'SOC_DLC_INCO';
}
public static function isView(): bool
{
return true;
}
public static function description(): string
{
return 'Objet miroir VIEW REFP.SOC_DLC_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->bigInteger('NO_ART')->nullable()->comment('Oracle: NUMBER(0, 0)');
$table->bigInteger('ID_SOCIETE')->primary()->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('UTILISABLE_SITE')->nullable()->comment('Oracle: NUMBER(2, 0)');
$table->bigInteger('UVERSION')->nullable()->comment('Oracle: NUMBER(0, 0)');
});
}
public static function down(Builder $schema): void
{
$schema->dropIfExists(self::table($schema->getConnection()));
}
}