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

63 lines
2 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.INCO_COMPO_NUTRISCORE
* Type : VIEW
* Description : Réplication miroir pour INCO_COMPO_NUTRISCORE
*/
final class IncoCompoNutriscoreView implements TableOrView
{
use IdentifiesTableOrView;
public static function schemaName(): string
{
return 'REFP';
}
public static function name(): string
{
return 'INCO_COMPO_NUTRISCORE';
}
public static function isView(): bool
{
return true;
}
public static function description(): string
{
return 'Objet miroir VIEW REFP.INCO_COMPO_NUTRISCORE 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('ID_INCO')->nullable()->comment('Oracle: NUMBER(0, 0)');
$table->string('NUMERO', 40)->nullable()->comment('Oracle: VARCHAR2(0, 0)');
$table->bigInteger('SCORE_NUTRI')->nullable()->comment('Oracle: NUMBER(0, 0)');
$table->string('CLASSEMENT', 4)->nullable()->comment('Oracle: VARCHAR2(0, 0)');
$table->string('NUTRI_SCORE_2022', 4)->nullable()->comment('Oracle: VARCHAR2(0, 0)');
$table->date('DAT_CRE')->nullable()->comment('Oracle: DATE(0, 0)');
$table->date('DAT_MAJ')->nullable()->comment('Oracle: DATE(0, 0)');
$table->bigInteger('UVERSION')->nullable()->comment('Oracle: NUMBER(0, 0)');
});
}
public static function down(Builder $schema): void
{
$schema->dropIfExists(self::table($schema->getConnection()));
}
}