Skip to content
Snippets Groups Projects
Commit 754c02eb authored by Laurent Lecluse's avatar Laurent Lecluse
Browse files

Ajout des TBL plafond pour calcul de feuilles de route

Correction soucis migration
parent 78ad80b0
Branches
Tags
No related merge requests found
......@@ -178,7 +178,7 @@ class v18Statuts extends AbstractMigration
$c->msg('Anciens statuts "TYPE_AGREMENT_STATUT" sauvegardés dans "SAVE_V18_TA_STATUT".');
}
if (empty($bdd->table()->get('SAVE_V18_DOSSIER_AUTRE_STATUT'))) {
if (!$this->manager->hasTable('SAVE_V18_DOSSIER_AUTRE_STATUT') && $this->manager->hasTable('DOSSIER_CHAMP_AUTRE_PAR_STATUT')) {
$this->manager->sauvegarderTable('DOSSIER_CHAMP_AUTRE_PAR_STATUT', 'SAVE_V18_DOSSIER_AUTRE_STATUT');
$c->msg('Anciens statuts "DOSSIER_CHAMP_AUTRE_PAR_STATUT" sauvegardés dans "SAVE_V18_DOSSIER_AUTRE_STATUT".');
}
......
......@@ -128,6 +128,20 @@ class MigrationManager
/**
* Détermine si une table existe dans la base de données avant migration
*
* @param string $tableName
*
* @return bool
*/
public function hasTable(string $tableName): bool
{
return isset($this->old->get(Ddl::TABLE)[$tableName]);
}
/**
* Détermine si une colonne existe dans la base de données avant migration
*
......
......@@ -701,7 +701,7 @@ return [
'CONSTRAINT_NAME' => 'TBL_PLAFOND_STR_UN',
'CUSTOM_CALCUL_PROC' => null,
'ORDRE' => 16,
'FEUILLE_DE_ROUTE' => false,
'FEUILLE_DE_ROUTE' => true,
],
[
'TBL_NAME' => 'plafond_intervenant',
......@@ -711,7 +711,7 @@ return [
'CONSTRAINT_NAME' => 'TBL_PLA_INT_UN',
'CUSTOM_CALCUL_PROC' => null,
'ORDRE' => 17,
'FEUILLE_DE_ROUTE' => false,
'FEUILLE_DE_ROUTE' => true,
],
[
'TBL_NAME' => 'plafond_element',
......@@ -721,7 +721,7 @@ return [
'CONSTRAINT_NAME' => 'TBL_PLAFOND_ELEMENT_UN',
'CUSTOM_CALCUL_PROC' => null,
'ORDRE' => 18,
'FEUILLE_DE_ROUTE' => false,
'FEUILLE_DE_ROUTE' => true,
],
[
'TBL_NAME' => 'plafond_volume_horaire',
......@@ -731,7 +731,7 @@ return [
'CONSTRAINT_NAME' => 'TBL_PLAFOND_VH_UN',
'CUSTOM_CALCUL_PROC' => null,
'ORDRE' => 19,
'FEUILLE_DE_ROUTE' => false,
'FEUILLE_DE_ROUTE' => true,
],
[
'TBL_NAME' => 'plafond_referentiel',
......@@ -741,7 +741,7 @@ return [
'CONSTRAINT_NAME' => 'TBL_PLAFOND_REF_UN',
'CUSTOM_CALCUL_PROC' => null,
'ORDRE' => 20,
'FEUILLE_DE_ROUTE' => false,
'FEUILLE_DE_ROUTE' => true,
],
],
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment