ldc-arcadia-api/database/arcadia-replicate/Tables/Refp/AssoCommunesCpTable.php

60 lines
1.6 KiB
PHP
Raw Normal View History

<?php
declare(strict_types=1);
namespace Database\ArcadiaReplicate\Tables\Refp;
use Database\ArcadiaReplicate\IdentifiesTableOrView;
use Database\ArcadiaReplicate\TableOrView;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Schema\Builder;
/**
* Schéma Oracle : REFP.ASSO_COMMUNES_CP
* Type : TABLE
* Description : Réplication miroir pour ASSO_COMMUNES_CP
*/
final class AssoCommunesCpTable implements TableOrView
{
use IdentifiesTableOrView;
public static function schemaName(): string
{
return 'REFP';
}
public static function name(): string
{
return 'ASSO_COMMUNES_CP';
}
public static function isView(): bool
{
return false;
}
public static function description(): string
{
return 'Objet miroir TABLE REFP.ASSO_COMMUNES_CP 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->string('NUM_COMMUNES', 20)->comment('Oracle: VARCHAR2(0, 0) [PK]');
$table->string('CP', 191)->comment('Oracle: VARCHAR2(0, 0) [PK]');
$table->unsignedBigInteger('UVERSION')->nullable()->comment('Oracle: NUMBER(10, 0)');
$table->primary(['NUM_COMMUNES', 'CP']);
});
}
public static function down(Builder $schema): void
{
$schema->dropIfExists(self::table($schema->getConnection()));
}
}