Commit b5243e1b authored by Laurent Lecluse's avatar Laurent Lecluse
Browse files

Merge branch 'master' of https://git.unicaen.fr/open-source/OSE into missions

parents 30f89d2b 3cee29df
Loading
Loading
Loading
Loading
+41 −0
Changes for admin/migration/v20Divers.php: 41 added lines, 0 removed lines.
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
Changes for module/Plafond/src/Service/PlafondService.php: 1 added line, 1 removed line.
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();