Commit 3cee29df authored by Laurent Lecluse's avatar Laurent Lecluse
Browse files

Nouveau script de migration pour lever les derniers blocages, petit bug de...

Nouveau script de migration pour lever les derniers blocages, petit bug de retour d'erreur de construction des plafonds
parent 2f7441a7
Loading
Loading
Loading
Loading
+41 −0
Original line number Diff line number Diff line
<?php





class v20Divers extends AbstractMigration
{

    public function description(): string
    {
        return "Transformation des modèles de contrats en états de sortie";
    }



    public function utile(): bool
    {
        return $this->manager->hasNew('table', 'TAG');
    }



    public function before()
    {
        $c   = $this->manager->getOseAdmin()->getConsole();
        $bdd = $this->manager->getBdd();

        $c->begin("Préparation de la migration vers la version 20");

        $bdd->exec("ALTER TABLE TYPE_INTERVENTION DROP CONSTRAINT TYPE_INTERVENTION_CODE_UN");
        $bdd->exec("DROP INDEX TYPE_INTERVENTION_CODE_UN");

        $oseAppliId = $this->manager->getOseAdmin()->getOseAppliId();
        $bdd->exec("UPDATE TYPE_INTERVENTION_STATUT SET HISTO_CREATEUR_ID = $oseAppliId WHERE HISTO_CREATEUR_ID IS NULL");
        $bdd->exec("UPDATE TYPE_INTERVENTION_STATUT SET HISTO_CREATION = SYSDATE WHERE HISTO_CREATION IS NULL");
        $bdd->exec("UPDATE TYPE_INTERVENTION_STATUT SET HISTO_MODIFICATION = SYSDATE WHERE HISTO_MODIFICATION IS NULL");

        $c->end("Préparation terminée");
    }
}
 No newline at end of file
+1 −1
Original line number Diff line number Diff line
@@ -440,7 +440,7 @@ class PlafondService extends AbstractEntityService
            }

            return $return;
        } catch (Exception $e) {
        } catch (\Exception $e) {
            $return['success'] = false;
            $return['error']   = $e->getMessage();