diff --git a/src/Bundle/ChillFranceTravailApiBundle/src/Resources/config/services.yml b/src/Bundle/ChillFranceTravailApiBundle/src/Resources/config/services.yml index 38d1400e1..1c4fca21e 100644 --- a/src/Bundle/ChillFranceTravailApiBundle/src/Resources/config/services.yml +++ b/src/Bundle/ChillFranceTravailApiBundle/src/Resources/config/services.yml @@ -1,7 +1,7 @@ services: Chill\FranceTravailApiBundle\ApiHelper\ApiWrapper: - $clientId: '%pole_emploi_dev_client_id%' - $clientSecret: '%pole_emploi_dev_client_secret%' + $clientId: '%env(FRANCE_TRAVAIL_CLIENT_ID)%' + $clientSecret: '%env(FRANCE_TRAVAIL_CLIENT_SECRET)%' $redis: '@Chill\MainBundle\Redis\ChillRedis' Chill\FranceTravailApiBundle\ApiHelper\PartenaireRomeAppellation: diff --git a/src/Bundle/ChillJobBundle/src/Controller/CSReportController.php b/src/Bundle/ChillJobBundle/src/Controller/CSReportController.php index fcb2304da..0fb85f89c 100644 --- a/src/Bundle/ChillJobBundle/src/Controller/CSReportController.php +++ b/src/Bundle/ChillJobBundle/src/Controller/CSReportController.php @@ -20,7 +20,7 @@ use Chill\JobBundle\Entity\CV; use Chill\JobBundle\Entity\Immersion; use Chill\JobBundle\Entity\ProjetProfessionnel; use Chill\PersonBundle\Security\Authorization\PersonVoter; -use Chill\JobBundle\Security\Authorization\CSConnectesVoter; +use Chill\JobBundle\Security\Authorization\JobVoter; class CSReportController extends AbstractController { @@ -45,18 +45,18 @@ class CSReportController extends AbstractController $kinds = []; -// if ($this->isGranted(CSConnectesVoter::REPORT_CV, $person)) { + if ($this->isGranted(JobVoter::REPORT_CV, $person)) { $kinds['cvs'] = CV::class; -// } + } -// if ($this->isGranted(CSConnectesVoter::REPORT_NEW, $person)) { + if ($this->isGranted(JobVoter::REPORT_NEW, $person)) { $kinds = \array_merge($kinds, [ 'cvs' => CV::class, 'freins' => Frein::class, 'immersions' => Immersion::class, 'projet_professionnels' => ProjetProfessionnel::class, ]); -// } + } foreach ($kinds as $key => $className) { $ordering = match ($key) { diff --git a/src/Bundle/ChillJobBundle/src/DependencyInjection/ChillJobExtension.php b/src/Bundle/ChillJobBundle/src/DependencyInjection/ChillJobExtension.php index 7e4050056..fd5edcffc 100644 --- a/src/Bundle/ChillJobBundle/src/DependencyInjection/ChillJobExtension.php +++ b/src/Bundle/ChillJobBundle/src/DependencyInjection/ChillJobExtension.php @@ -94,6 +94,10 @@ class ChillJobExtension extends Extension implements PrependExtensionInterface 'role' => 'ROLE_USER', 'template' => '@ChillJob/CV/edit.html.twig', ], + 'delete' => [ + 'role' => 'ROLE_USER', + 'template' => '@ChillJob/CV/delete.html.twig', + ] ], ], [ diff --git a/src/Bundle/ChillJobBundle/src/Entity/CSPerson.php b/src/Bundle/ChillJobBundle/src/Entity/CSPerson.php index e7bd12502..579698a64 100644 --- a/src/Bundle/ChillJobBundle/src/Entity/CSPerson.php +++ b/src/Bundle/ChillJobBundle/src/Entity/CSPerson.php @@ -22,7 +22,7 @@ use Chill\PersonBundle\Entity\MaritalStatus; /** * CSPerson. */ -#[ORM\Table(name: 'chill_csconnectes.cs_person')] +#[ORM\Table(name: 'chill_job.cs_person')] #[ORM\Entity(repositoryClass: \Chill\JobBundle\Repository\CSPersonRepository::class)] class CSPerson { diff --git a/src/Bundle/ChillJobBundle/src/Entity/CV.php b/src/Bundle/ChillJobBundle/src/Entity/CV.php index 2a2e89883..597303510 100644 --- a/src/Bundle/ChillJobBundle/src/Entity/CV.php +++ b/src/Bundle/ChillJobBundle/src/Entity/CV.php @@ -21,7 +21,7 @@ use Symfony\Component\Validator\Constraints as Assert; /** * CV. */ -#[ORM\Table(name: 'chill_csconnectes.cv')] +#[ORM\Table(name: 'chill_job.cv')] #[ORM\Entity(repositoryClass: \Chill\JobBundle\Repository\CVRepository::class)] class CV implements \Stringable { diff --git a/src/Bundle/ChillJobBundle/src/Entity/CV/Experience.php b/src/Bundle/ChillJobBundle/src/Entity/CV/Experience.php index 19d444338..521cc82f6 100644 --- a/src/Bundle/ChillJobBundle/src/Entity/CV/Experience.php +++ b/src/Bundle/ChillJobBundle/src/Entity/CV/Experience.php @@ -18,7 +18,7 @@ use Symfony\Component\Validator\Constraints as Assert; /** * Experience. */ -#[ORM\Table(name: 'chill_csconnectes.cv_experience')] +#[ORM\Table(name: 'chill_job.cv_experience')] #[ORM\Entity(repositoryClass: \Chill\JobBundle\Repository\CV\ExperienceRepository::class)] class Experience { diff --git a/src/Bundle/ChillJobBundle/src/Entity/CV/Formation.php b/src/Bundle/ChillJobBundle/src/Entity/CV/Formation.php index 84bfda163..3394fa795 100644 --- a/src/Bundle/ChillJobBundle/src/Entity/CV/Formation.php +++ b/src/Bundle/ChillJobBundle/src/Entity/CV/Formation.php @@ -18,7 +18,7 @@ use Symfony\Component\Validator\Constraints as Assert; /** * Formation. */ -#[ORM\Table(name: 'chill_csconnectes.cv_formation')] +#[ORM\Table(name: 'chill_job.cv_formation')] #[ORM\Entity(repositoryClass: \Chill\JobBundle\Repository\CV\FormationRepository::class)] class Formation { diff --git a/src/Bundle/ChillJobBundle/src/Entity/Frein.php b/src/Bundle/ChillJobBundle/src/Entity/Frein.php index a145aac34..b60a342fd 100644 --- a/src/Bundle/ChillJobBundle/src/Entity/Frein.php +++ b/src/Bundle/ChillJobBundle/src/Entity/Frein.php @@ -20,7 +20,7 @@ use Symfony\Component\Validator\Context\ExecutionContextInterface; /** * Frein. */ -#[ORM\Table(name: 'chill_csconnectes.frein')] +#[ORM\Table(name: 'chill_job.frein')] #[ORM\Entity(repositoryClass: \Chill\JobBundle\Repository\FreinRepository::class)] class Frein implements HasPerson, \Stringable { diff --git a/src/Bundle/ChillJobBundle/src/Entity/Immersion.php b/src/Bundle/ChillJobBundle/src/Entity/Immersion.php index 8c4e10baf..478615d83 100644 --- a/src/Bundle/ChillJobBundle/src/Entity/Immersion.php +++ b/src/Bundle/ChillJobBundle/src/Entity/Immersion.php @@ -24,7 +24,7 @@ use Chill\MainBundle\Validation\Constraint\PhonenumberConstraint; /** * Immersion. */ -#[ORM\Table(name: 'chill_csconnectes.immersion')] +#[ORM\Table(name: 'chill_job.immersion')] #[ORM\Entity(repositoryClass: ImmersionRepository::class)] class Immersion implements \Stringable { diff --git a/src/Bundle/ChillJobBundle/src/Entity/ProjetProfessionnel.php b/src/Bundle/ChillJobBundle/src/Entity/ProjetProfessionnel.php index e9ed41bb5..40141b9e3 100644 --- a/src/Bundle/ChillJobBundle/src/Entity/ProjetProfessionnel.php +++ b/src/Bundle/ChillJobBundle/src/Entity/ProjetProfessionnel.php @@ -23,7 +23,7 @@ use Chill\JobBundle\Entity\Rome\Appellation; /** * ProjetProfessionnel. */ -#[ORM\Table(name: 'chill_csconnectes.projet_professionnel')] +#[ORM\Table(name: 'chill_job.projet_professionnel')] #[ORM\Entity(repositoryClass: ProjetProfessionnelRepository::class)] class ProjetProfessionnel implements \Stringable { @@ -47,7 +47,7 @@ class ProjetProfessionnel implements \Stringable /** * @var \Doctrine\Common\Collections\Collection */ - #[ORM\JoinTable(name: 'chill_csconnectes.projetprofessionnel_souhait')] + #[ORM\JoinTable(name: 'chill_job.projetprofessionnel_souhait')] #[ORM\ManyToMany(targetEntity: Appellation::class, cascade: ['persist'])] private Collection $souhait; @@ -96,7 +96,7 @@ class ProjetProfessionnel implements \Stringable /** * @var \Doctrine\Common\Collections\Collection */ - #[ORM\JoinTable(name: 'chill_csconnectes.projetprofessionnel_valide')] + #[ORM\JoinTable(name: 'chill_job.projetprofessionnel_valide')] #[ORM\ManyToMany(targetEntity: Appellation::class)] private Collection $valide; diff --git a/src/Bundle/ChillJobBundle/src/Entity/Rome/Appellation.php b/src/Bundle/ChillJobBundle/src/Entity/Rome/Appellation.php index 2fda76700..1d2c3b026 100644 --- a/src/Bundle/ChillJobBundle/src/Entity/Rome/Appellation.php +++ b/src/Bundle/ChillJobBundle/src/Entity/Rome/Appellation.php @@ -16,7 +16,7 @@ use Doctrine\ORM\Mapping as ORM; /** * Appellation. */ -#[ORM\Table(name: 'chill_csconnectes.rome_appellation')] +#[ORM\Table(name: 'chill_job.rome_appellation')] #[ORM\Entity(repositoryClass: \Chill\JobBundle\Repository\Rome\AppellationRepository::class)] class Appellation implements \Stringable { diff --git a/src/Bundle/ChillJobBundle/src/Entity/Rome/Metier.php b/src/Bundle/ChillJobBundle/src/Entity/Rome/Metier.php index 0f0ffe3bc..668b2283f 100644 --- a/src/Bundle/ChillJobBundle/src/Entity/Rome/Metier.php +++ b/src/Bundle/ChillJobBundle/src/Entity/Rome/Metier.php @@ -17,7 +17,7 @@ use Doctrine\Common\Collections\ArrayCollection; /** * Metier. */ -#[ORM\Table(name: 'chill_csconnectes.rome_metier')] +#[ORM\Table(name: 'chill_job.rome_metier')] #[ORM\Entity(repositoryClass: \Chill\JobBundle\Repository\Rome\MetierRepository::class)] class Metier { diff --git a/src/Bundle/ChillJobBundle/src/Export/ListCSPerson.php b/src/Bundle/ChillJobBundle/src/Export/ListCSPerson.php index 3ab0f1b89..5740ad466 100644 --- a/src/Bundle/ChillJobBundle/src/Export/ListCSPerson.php +++ b/src/Bundle/ChillJobBundle/src/Export/ListCSPerson.php @@ -599,7 +599,7 @@ SELECT FROM public.chill_person_person AS p - LEFT JOIN chill_csconnectes.cs_person AS cs + LEFT JOIN chill_job.cs_person AS cs ON p.id = cs.person_id LEFT JOIN chill_3party.third_party AS tpp ON cs.prescripteur_id = tpp.id diff --git a/src/Bundle/ChillJobBundle/src/Export/ListCV.php b/src/Bundle/ChillJobBundle/src/Export/ListCV.php index 51ca0f3f4..39504a096 100644 --- a/src/Bundle/ChillJobBundle/src/Export/ListCV.php +++ b/src/Bundle/ChillJobBundle/src/Export/ListCV.php @@ -16,7 +16,7 @@ use Chill\MainBundle\Export\FormatterInterface; use Chill\MainBundle\Export\ListInterface; use Chill\MainBundle\Form\Type\ChillDateType; use Chill\PersonBundle\Entity\Person; -use Chill\JobBundle\Security\Authorization\ExportsVoter; +use Chill\JobBundle\Security\Authorization\ExportsJobVoter; use Doctrine\ORM\EntityManagerInterface; use Doctrine\ORM\Query; use Doctrine\ORM\QueryBuilder; @@ -194,7 +194,7 @@ class ListCV implements ListInterface, ExportElementValidatedInterface */ public function requiredRole(): string { - return ExportsVoter::EXPORT; + return ExportsJobVoter::EXPORT; } /** @@ -369,7 +369,7 @@ SELECT cv.formationlevel as formationlevel FROM public.chill_person_person AS p -LEFT JOIN chill_csconnectes.cv AS cv +LEFT JOIN chill_job.cv AS cv ON p.id = cv.person_id LEFT JOIN public.country AS cn ON p.countryofbirth_id = cn.id diff --git a/src/Bundle/ChillJobBundle/src/Export/ListFrein.php b/src/Bundle/ChillJobBundle/src/Export/ListFrein.php index b94cc0342..9bf546f55 100644 --- a/src/Bundle/ChillJobBundle/src/Export/ListFrein.php +++ b/src/Bundle/ChillJobBundle/src/Export/ListFrein.php @@ -17,7 +17,7 @@ use Chill\MainBundle\Export\ListInterface; use Chill\MainBundle\Form\Type\ChillDateType; use Chill\PersonBundle\Entity\Person; use Chill\JobBundle\Entity\Frein; -use Chill\JobBundle\Security\Authorization\ExportsVoter; +use Chill\JobBundle\Security\Authorization\ExportsJobVoter; use Doctrine\ORM\EntityManagerInterface; use Doctrine\ORM\Query; use Doctrine\ORM\QueryBuilder; @@ -207,7 +207,7 @@ class ListFrein implements ListInterface, ExportElementValidatedInterface */ public function requiredRole(): string { - return ExportsVoter::EXPORT; + return ExportsJobVoter::EXPORT; } /** @@ -471,7 +471,7 @@ SELECT fr.notesemploi as notesemploi FROM public.chill_person_person AS p -LEFT JOIN chill_csconnectes.frein AS fr +LEFT JOIN chill_job.frein AS fr ON p.id = fr.person_id LEFT JOIN public.country AS cn ON p.countryofbirth_id = cn.id diff --git a/src/Bundle/ChillJobBundle/src/Export/ListProjetProfessionnel.php b/src/Bundle/ChillJobBundle/src/Export/ListProjetProfessionnel.php index 73434474b..52bbc1637 100644 --- a/src/Bundle/ChillJobBundle/src/Export/ListProjetProfessionnel.php +++ b/src/Bundle/ChillJobBundle/src/Export/ListProjetProfessionnel.php @@ -17,7 +17,7 @@ use Chill\MainBundle\Export\ListInterface; use Chill\MainBundle\Form\Type\ChillDateType; use Chill\PersonBundle\Entity\Person; use Chill\JobBundle\Entity\ProjetProfessionnel; -use Chill\JobBundle\Security\Authorization\ExportsVoter; +use Chill\JobBundle\Security\Authorization\ExportsJobVoter; use Doctrine\ORM\EntityManagerInterface; use Doctrine\ORM\Query; use Doctrine\ORM\QueryBuilder; @@ -213,7 +213,7 @@ class ListProjetProfessionnel implements ListInterface, ExportElementValidatedIn */ public function requiredRole(): string { - return ExportsVoter::EXPORT; + return ExportsJobVoter::EXPORT; } /** @@ -520,19 +520,19 @@ WITH projet_professionnel AS ( ARRAY_AGG (DISTINCT rms.code) as rms_codes, ARRAY_AGG (DISTINCT rmv.code) as rmv_codes - FROM chill_csconnectes.projet_professionnel AS pp + FROM chill_job.projet_professionnel AS pp - LEFT OUTER JOIN chill_csconnectes.projetprofessionnel_souhait AS pps + LEFT OUTER JOIN chill_job.projetprofessionnel_souhait AS pps ON pp.id = pps.projetprofessionnel_id - LEFT OUTER JOIN chill_csconnectes.rome_appellation AS ras + LEFT OUTER JOIN chill_job.rome_appellation AS ras ON pps.appellation_id = ras.id - LEFT OUTER JOIN chill_csconnectes.rome_metier AS rms + LEFT OUTER JOIN chill_job.rome_metier AS rms ON ras.metier_id = rms.id - LEFT OUTER JOIN chill_csconnectes.projetprofessionnel_valide AS ppv + LEFT OUTER JOIN chill_job.projetprofessionnel_valide AS ppv ON pp.id = ppv.projetprofessionnel_id - LEFT OUTER JOIN chill_csconnectes.rome_appellation AS rav + LEFT OUTER JOIN chill_job.rome_appellation AS rav ON ppv.appellation_id = rav.id - LEFT OUTER JOIN chill_csconnectes.rome_metier AS rmv + LEFT OUTER JOIN chill_job.rome_metier AS rmv ON rav.metier_id = rmv.id GROUP BY pp.id diff --git a/src/Bundle/ChillJobBundle/src/Form/CSPersonDispositifsType.php b/src/Bundle/ChillJobBundle/src/Form/CSPersonDispositifsType.php index b30a07153..187c5f656 100644 --- a/src/Bundle/ChillJobBundle/src/Form/CSPersonDispositifsType.php +++ b/src/Bundle/ChillJobBundle/src/Form/CSPersonDispositifsType.php @@ -120,6 +120,6 @@ class CSPersonDispositifsType extends AbstractType public function getBlockPrefix() { - return 'csconnectes_spbundle_csperson'; + return 'job_bundle_csperson'; } } diff --git a/src/Bundle/ChillJobBundle/src/Form/CSPersonPersonalSituationType.php b/src/Bundle/ChillJobBundle/src/Form/CSPersonPersonalSituationType.php index ef2e8ef59..ba04d8b0f 100644 --- a/src/Bundle/ChillJobBundle/src/Form/CSPersonPersonalSituationType.php +++ b/src/Bundle/ChillJobBundle/src/Form/CSPersonPersonalSituationType.php @@ -251,6 +251,6 @@ class CSPersonPersonalSituationType extends AbstractType public function getBlockPrefix() { - return 'csconnectes_spbundle_csperson'; + return 'job_bundle_csperson'; } } diff --git a/src/Bundle/ChillJobBundle/src/Form/CV/ExperienceType.php b/src/Bundle/ChillJobBundle/src/Form/CV/ExperienceType.php index d38a69adf..de74f2a22 100644 --- a/src/Bundle/ChillJobBundle/src/Form/CV/ExperienceType.php +++ b/src/Bundle/ChillJobBundle/src/Form/CV/ExperienceType.php @@ -65,6 +65,6 @@ class ExperienceType extends AbstractType public function getBlockPrefix() { - return 'csconnectes_spbundle_cv_experience'; + return 'job_bundle_cv_experience'; } } diff --git a/src/Bundle/ChillJobBundle/src/Form/CV/FormationType.php b/src/Bundle/ChillJobBundle/src/Form/CV/FormationType.php index 90d537a44..83093d95b 100644 --- a/src/Bundle/ChillJobBundle/src/Form/CV/FormationType.php +++ b/src/Bundle/ChillJobBundle/src/Form/CV/FormationType.php @@ -70,6 +70,6 @@ class FormationType extends AbstractType public function getBlockPrefix() { - return 'csconnectes_spbundle_cv_formation'; + return 'job_bundle_cv_formation'; } } diff --git a/src/Bundle/ChillJobBundle/src/Form/CVType.php b/src/Bundle/ChillJobBundle/src/Form/CVType.php index f5125e2bb..c6fb6614d 100644 --- a/src/Bundle/ChillJobBundle/src/Form/CVType.php +++ b/src/Bundle/ChillJobBundle/src/Form/CVType.php @@ -86,6 +86,6 @@ class CVType extends AbstractType public function getBlockPrefix() { - return 'csconnectes_spbundle_cv'; + return 'job_bundle_cv'; } } diff --git a/src/Bundle/ChillJobBundle/src/Form/FreinType.php b/src/Bundle/ChillJobBundle/src/Form/FreinType.php index 62d822d56..43c28ddeb 100644 --- a/src/Bundle/ChillJobBundle/src/Form/FreinType.php +++ b/src/Bundle/ChillJobBundle/src/Form/FreinType.php @@ -61,6 +61,6 @@ class FreinType extends AbstractType public function getBlockPrefix() { - return 'csconnectes_spbundle_frein'; + return 'job_bundle_frein'; } } diff --git a/src/Bundle/ChillJobBundle/src/Form/ImmersionType.php b/src/Bundle/ChillJobBundle/src/Form/ImmersionType.php index 4ad8e9ad0..ed5e2276e 100644 --- a/src/Bundle/ChillJobBundle/src/Form/ImmersionType.php +++ b/src/Bundle/ChillJobBundle/src/Form/ImmersionType.php @@ -192,6 +192,6 @@ class ImmersionType extends AbstractType public function getBlockPrefix() { - return 'csconnectes_spbundle_immersion'; + return 'job_bundle_immersion'; } } diff --git a/src/Bundle/ChillJobBundle/src/Form/ProjetProfessionnelType.php b/src/Bundle/ChillJobBundle/src/Form/ProjetProfessionnelType.php index 60b23b814..4817dfcc3 100644 --- a/src/Bundle/ChillJobBundle/src/Form/ProjetProfessionnelType.php +++ b/src/Bundle/ChillJobBundle/src/Form/ProjetProfessionnelType.php @@ -103,6 +103,6 @@ class ProjetProfessionnelType extends AbstractType public function getBlockPrefix() { - return 'csconnectes_spbundle_projetprofessionnel'; + return 'job_bundle_projetprofessionnel'; } } diff --git a/src/Bundle/ChillJobBundle/src/Menu/MenuBuilder.php b/src/Bundle/ChillJobBundle/src/Menu/MenuBuilder.php index c5d3f2596..e3119a392 100644 --- a/src/Bundle/ChillJobBundle/src/Menu/MenuBuilder.php +++ b/src/Bundle/ChillJobBundle/src/Menu/MenuBuilder.php @@ -14,7 +14,7 @@ namespace Chill\JobBundle\Menu; use Chill\MainBundle\Routing\LocalMenuBuilderInterface; use Knp\Menu\MenuItem; use Symfony\Component\Security\Core\Authorization\AuthorizationCheckerInterface; -use Chill\JobBundle\Security\Authorization\CSConnectesVoter; +use Chill\JobBundle\Security\Authorization\JobVoter; class MenuBuilder implements LocalMenuBuilderInterface { @@ -33,26 +33,26 @@ class MenuBuilder implements LocalMenuBuilderInterface /** @var \Chill\PersonBundle\Entity\Person $person */ $person = $parameters['person']; - // if ($this->authorizationChecker->isGranted(CSConnectesVoter::REPORT_NEW, $person)) { - $menu->addChild('Situation personnelle', [ - 'route' => 'chill_crud_job_personal_situation_view', - 'routeParameters' => [ - 'person' => $person->getId(), - ], - ]) - ->setExtras([ - 'order' => 50, - ]); - $menu->addChild('Dispositifs', [ - 'route' => 'chill_crud_job_dispositifs_view', - 'routeParameters' => [ - 'person' => $person->getId(), - ], - ]) - ->setExtras([ - 'order' => 51, - ]); - // } + if ($this->authorizationChecker->isGranted(JobVoter::REPORT_NEW, $person)) { + $menu->addChild('Situation personnelle', [ + 'route' => 'chill_crud_job_personal_situation_view', + 'routeParameters' => [ + 'person' => $person->getId(), + ], + ]) + ->setExtras([ + 'order' => 50, + ]); + $menu->addChild('Dispositifs', [ + 'route' => 'chill_crud_job_dispositifs_view', + 'routeParameters' => [ + 'person' => $person->getId(), + ], + ]) + ->setExtras([ + 'order' => 51, + ]); + } $menu->addChild('Emploi', [ 'route' => 'chill_job_report_index', @@ -60,9 +60,9 @@ class MenuBuilder implements LocalMenuBuilderInterface 'person' => $person->getId(), ], ]) - ->setExtras([ - 'order' => 52, - ]); + ->setExtras([ + 'order' => 52, + ]); } public static function getMenuIds(): array diff --git a/src/Bundle/ChillJobBundle/src/Resources/config/services/security.yml b/src/Bundle/ChillJobBundle/src/Resources/config/services/security.yml index 3d94cec44..c680bc374 100644 --- a/src/Bundle/ChillJobBundle/src/Resources/config/services/security.yml +++ b/src/Bundle/ChillJobBundle/src/Resources/config/services/security.yml @@ -1,15 +1,13 @@ services: - Chill\JobBundle\Security\Authorization\CSConnectesVoter: - arguments: - $authorizationHelper: '@Chill\MainBundle\Security\Authorization\AuthorizationHelper' + Chill\JobBundle\Security\Authorization\JobVoter: + autowire: true + autoconfigure: true tags: - { name: security.voter } - - { name: chill.role } - Chill\JobBundle\Security\Authorization\ExportsVoter: - arguments: - $authorizationHelper: '@Chill\MainBundle\Security\Authorization\AuthorizationHelper' + Chill\JobBundle\Security\Authorization\ExportsJobVoter: + autowire: true + autoconfigure: true tags: - { name: security.voter } - - { name: chill.role } diff --git a/src/Bundle/ChillJobBundle/src/Resources/translations/messages.fr.yml b/src/Bundle/ChillJobBundle/src/Resources/translations/messages.fr.yml index 94cd10a0d..2baf95ad4 100644 --- a/src/Bundle/ChillJobBundle/src/Resources/translations/messages.fr.yml +++ b/src/Bundle/ChillJobBundle/src/Resources/translations/messages.fr.yml @@ -247,7 +247,7 @@ neetcommissiondate: "Date de commission NEET" fsemademarchecode: "Code démarche FSE" findernieremploidate: "Date de fin dernier emploi" -CHILL_CSCONNECTES_REPORT_NEW: Création et modification des rapports CSConnectes -CHILL_CSCONNECTES_REPORT_DELETE: Suppression des rapports CSConnectes -CHILL_CSCONNECTES_REPORT_CV: Création et modification des rapports CSConnectes (CV uniquement) -CHILL_CSCONNECTES_EXPORTS: Exports CSConnectes +CHILL_JOB_REPORT_NEW: Création et modification des rapports emploi +CHILL_JOB_REPORT_DELETE: Suppression des rapports emploi +CHILL_JOB_REPORT_CV: Création et modification des rapports emploi (CV uniquement) +CHILL_JOB_EXPORTS: Exports emploi diff --git a/src/Bundle/ChillJobBundle/src/Resources/views/CV/edit.html.twig b/src/Bundle/ChillJobBundle/src/Resources/views/CV/edit.html.twig index ddd16f9bf..2ebb37e3d 100644 --- a/src/Bundle/ChillJobBundle/src/Resources/views/CV/edit.html.twig +++ b/src/Bundle/ChillJobBundle/src/Resources/views/CV/edit.html.twig @@ -8,7 +8,7 @@ {% endblock title %} {% form_theme form _self %} -{% block csconnectes_spbundle_cv_formation_widget %} +{% block job_bundle_cv_formation_widget %}
{{ form_row(form.title) }} {{ form_row(form.organisme) }} diff --git a/src/Bundle/ChillJobBundle/src/Resources/views/CV/new.html.twig b/src/Bundle/ChillJobBundle/src/Resources/views/CV/new.html.twig index fc285b50f..756c5a699 100644 --- a/src/Bundle/ChillJobBundle/src/Resources/views/CV/new.html.twig +++ b/src/Bundle/ChillJobBundle/src/Resources/views/CV/new.html.twig @@ -8,7 +8,7 @@ {% endblock %} {% form_theme form _self %} -{% block csconnectes_spbundle_cv_formation_widget %} +{% block job_bundle_cv_formation_widget %}
{{ form_row(form.title) }} {{ form_row(form.organisme) }} diff --git a/src/Bundle/ChillJobBundle/src/Resources/views/CV/view.html.twig b/src/Bundle/ChillJobBundle/src/Resources/views/CV/view.html.twig index cae02a387..7caa8c709 100644 --- a/src/Bundle/ChillJobBundle/src/Resources/views/CV/view.html.twig +++ b/src/Bundle/ChillJobBundle/src/Resources/views/CV/view.html.twig @@ -42,7 +42,7 @@ {% if entity.formations|length > 0 %} {% for f in entity.formations %}
-
+

{{ f.title }}{% if f.organisme is not empty %} auprès de {{ f.organisme }}{% endif %}

@@ -78,7 +78,7 @@ {% if entity.formations|length > 0 %} {% for f in entity.experiences %}
-
+

{{ f.poste }} {% if f.structure is not empty %}auprès de {{ f.structure }}{% endif %}

@@ -131,13 +131,13 @@ {% block css %} diff --git a/src/Bundle/ChillJobBundle/src/Resources/views/Report/index.html.twig b/src/Bundle/ChillJobBundle/src/Resources/views/Report/index.html.twig index 2abe8d57a..cc6cca86e 100644 --- a/src/Bundle/ChillJobBundle/src/Resources/views/Report/index.html.twig +++ b/src/Bundle/ChillJobBundle/src/Resources/views/Report/index.html.twig @@ -31,7 +31,7 @@
  • - {% if is_granted('CHILL_CSCONNECTES_REPORT_DELETE', cv) %} + {% if is_granted('CHILL_JOB_REPORT_DELETE', cv) %}
  • @@ -93,7 +93,7 @@
  • - {% if is_granted('CHILL_CSCONNECTES_REPORT_DELETE', frein) %} + {% if is_granted('CHILL_JOB_REPORT_DELETE', frein) %}
  • @@ -150,7 +150,7 @@ - {% if is_granted('CHILL_CSCONNECTES_REPORT_DELETE', im) %} + {% if is_granted('CHILL_JOB_REPORT_DELETE', im) %}
  • @@ -226,7 +226,7 @@
  • - {% if is_granted('CHILL_CSCONNECTES_REPORT_DELETE', pr) %} + {% if is_granted('CHILL_JOB_REPORT_DELETE', pr) %}
  • diff --git a/src/Bundle/ChillJobBundle/src/Security/Authorization/ExportsVoter.php b/src/Bundle/ChillJobBundle/src/Security/Authorization/ExportsJobVoter.php similarity index 92% rename from src/Bundle/ChillJobBundle/src/Security/Authorization/ExportsVoter.php rename to src/Bundle/ChillJobBundle/src/Security/Authorization/ExportsJobVoter.php index 7ccf04364..27139d9ac 100644 --- a/src/Bundle/ChillJobBundle/src/Security/Authorization/ExportsVoter.php +++ b/src/Bundle/ChillJobBundle/src/Security/Authorization/ExportsJobVoter.php @@ -21,13 +21,13 @@ use Symfony\Component\Security\Core\Authorization\Voter\VoterInterface; use Symfony\Component\Security\Core\Role\Role; /** - * Class ExportsVoter. + * Class ExportsJobVoter. * * @author Mathieu Jaumotte mathieu.jaumotte@champs-libres.coop */ -class ExportsVoter extends AbstractChillVoter implements ProvideRoleHierarchyInterface, VoterInterface +class ExportsJobVoter extends AbstractChillVoter implements ProvideRoleHierarchyInterface, VoterInterface { - public const EXPORT = 'CHILL_CSCONNECTES_EXPORTS'; + public const EXPORT = 'CHILL_JOB_EXPORTS'; /** * @var AuthorizationHelper @@ -89,7 +89,7 @@ class ExportsVoter extends AbstractChillVoter implements ProvideRoleHierarchyInt */ public function getRolesWithHierarchy(): array { - return ['CSConnectes' => $this->getRoles()]; + return ['Job' => $this->getRoles()]; } /** diff --git a/src/Bundle/ChillJobBundle/src/Security/Authorization/CSConnectesVoter.php b/src/Bundle/ChillJobBundle/src/Security/Authorization/JobVoter.php similarity index 89% rename from src/Bundle/ChillJobBundle/src/Security/Authorization/CSConnectesVoter.php rename to src/Bundle/ChillJobBundle/src/Security/Authorization/JobVoter.php index dc7e651d4..ce0a6c10c 100644 --- a/src/Bundle/ChillJobBundle/src/Security/Authorization/CSConnectesVoter.php +++ b/src/Bundle/ChillJobBundle/src/Security/Authorization/JobVoter.php @@ -23,13 +23,13 @@ use Chill\PersonBundle\Entity\Person; use Chill\MainBundle\Security\Authorization\AuthorizationHelper; /** - * check ACL for CSConnectes. + * check ACL for JobBundle. */ -class CSConnectesVoter extends AbstractChillVoter implements ProvideRoleHierarchyInterface +class JobVoter extends AbstractChillVoter implements ProvideRoleHierarchyInterface { - public const REPORT_NEW = 'CHILL_CSCONNECTES_REPORT_NEW'; - public const REPORT_CV = 'CHILL_CSCONNECTES_REPORT_CV'; - public const REPORT_DELETE = 'CHILL_CSCONNECTES_REPORT_DELETE'; + public const REPORT_NEW = 'CHILL_JOB_REPORT_NEW'; + public const REPORT_CV = 'CHILL_JOB_REPORT_CV'; + public const REPORT_DELETE = 'CHILL_JOB_REPORT_DELETE'; public const ALL = [ self::REPORT_NEW, @@ -110,7 +110,7 @@ class CSConnectesVoter extends AbstractChillVoter implements ProvideRoleHierarch public function getRolesWithHierarchy(): array { - return ['CSConnectes' => $this->getRoles()]; + return ['Job' => $this->getRoles()]; } public function getRolesWithoutScope(): array diff --git a/src/Bundle/ChillJobBundle/src/migrations/Version20240424095147.php b/src/Bundle/ChillJobBundle/src/migrations/Version20240424095147.php index 4b75d8e1b..97b0a376a 100644 --- a/src/Bundle/ChillJobBundle/src/migrations/Version20240424095147.php +++ b/src/Bundle/ChillJobBundle/src/migrations/Version20240424095147.php @@ -23,136 +23,136 @@ final class Version20240424095147 extends AbstractMigration public function up(Schema $schema): void { - $this->addSql('CREATE SCHEMA chill_csconnectes'); - $this->addSql('CREATE SEQUENCE chill_csconnectes.cv_id_seq INCREMENT BY 1 MINVALUE 1 START 1'); - $this->addSql('CREATE SEQUENCE chill_csconnectes.cv_experience_id_seq INCREMENT BY 1 MINVALUE 1 START 1'); - $this->addSql('CREATE SEQUENCE chill_csconnectes.cv_formation_id_seq INCREMENT BY 1 MINVALUE 1 START 1'); - $this->addSql('CREATE SEQUENCE chill_csconnectes.frein_id_seq INCREMENT BY 1 MINVALUE 1 START 1'); - $this->addSql('CREATE SEQUENCE chill_csconnectes.immersion_id_seq INCREMENT BY 1 MINVALUE 1 START 1'); - $this->addSql('CREATE SEQUENCE chill_csconnectes.projet_professionnel_id_seq INCREMENT BY 1 MINVALUE 1 START 1'); - $this->addSql('CREATE SEQUENCE chill_csconnectes.rome_appellation_id_seq INCREMENT BY 1 MINVALUE 1 START 1'); - $this->addSql('CREATE SEQUENCE chill_csconnectes.rome_metier_id_seq INCREMENT BY 1 MINVALUE 1 START 1'); - $this->addSql('CREATE TABLE chill_csconnectes.cs_person (id INT NOT NULL, person_id INT DEFAULT NULL, prescripteur_id INT DEFAULT NULL, situationLogement VARCHAR(255) DEFAULT NULL, situationLogementPrecision TEXT DEFAULT NULL, enfantACharge INT DEFAULT NULL, niveauMaitriseLangue JSON DEFAULT NULL, vehiculePersonnel BOOLEAN DEFAULT NULL, permisConduire JSON DEFAULT NULL, situationProfessionnelle VARCHAR(255) DEFAULT NULL, dateFinDernierEmploi DATE DEFAULT NULL, typeContrat JSON DEFAULT NULL, typeContratAide TEXT DEFAULT NULL, ressources JSON DEFAULT NULL, ressourcesComment TEXT DEFAULT NULL, ressourceDate1Versement DATE DEFAULT NULL, CPFMontant NUMERIC(10, 2) DEFAULT NULL, acomptedif NUMERIC(10, 2) DEFAULT NULL, accompagnement JSON DEFAULT NULL, accompagnementRQTHDate DATE DEFAULT NULL, accompagnementComment VARCHAR(255) DEFAULT NULL, poleEmploiId VARCHAR(255) DEFAULT NULL, poleEmploiInscriptionDate DATE DEFAULT NULL, cafId VARCHAR(255) DEFAULT NULL, cafInscriptionDate DATE DEFAULT NULL, CERInscriptionDate DATE DEFAULT NULL, PPAEInscriptionDate DATE DEFAULT NULL, CERSignataire TEXT DEFAULT NULL, PPAESignataire TEXT DEFAULT NULL, NEETEligibilite VARCHAR(255) DEFAULT NULL, NEETCommissionDate DATE DEFAULT NULL, FSEMaDemarcheCode TEXT DEFAULT NULL, datecontratIEJ DATE DEFAULT NULL, dateavenantIEJ DATE DEFAULT NULL, dispositifs_notes TEXT DEFAULT NULL, handicap BOOLEAN DEFAULT NULL, handicapnotes TEXT DEFAULT NULL, handicapRecommandation VARCHAR(50) DEFAULT NULL, mobilitemoyentransport JSON DEFAULT NULL, mobilitenotes TEXT DEFAULT NULL, handicapAccompagnement_id INT DEFAULT NULL, documentCV_id INT DEFAULT NULL, documentAgrementIAE_id INT DEFAULT NULL, documentRQTH_id INT DEFAULT NULL, documentAttestationNEET_id INT DEFAULT NULL, documentCI_id INT DEFAULT NULL, documentTitreSejour_id INT DEFAULT NULL, documentAttestationFiscale_id INT DEFAULT NULL, documentPermis_id INT DEFAULT NULL, documentAttestationCAAF_id INT DEFAULT NULL, documentContraTravail_id INT DEFAULT NULL, documentAttestationFormation_id INT DEFAULT NULL, documentQuittanceLoyer_id INT DEFAULT NULL, documentFactureElectricite_id INT DEFAULT NULL, documentAttestationSecuriteSociale_id INT DEFAULT NULL, PRIMARY KEY(id))'); - $this->addSql('CREATE UNIQUE INDEX UNIQ_10864F31217BBB47 ON chill_csconnectes.cs_person (person_id)'); - $this->addSql('CREATE INDEX IDX_10864F312654B57D ON chill_csconnectes.cs_person (handicapAccompagnement_id)'); - $this->addSql('CREATE INDEX IDX_10864F3154866550 ON chill_csconnectes.cs_person (documentCV_id)'); - $this->addSql('CREATE INDEX IDX_10864F318825E118 ON chill_csconnectes.cs_person (documentAgrementIAE_id)'); - $this->addSql('CREATE INDEX IDX_10864F31A396AFAC ON chill_csconnectes.cs_person (documentRQTH_id)'); - $this->addSql('CREATE INDEX IDX_10864F3187541764 ON chill_csconnectes.cs_person (documentAttestationNEET_id)'); - $this->addSql('CREATE INDEX IDX_10864F315CFC2299 ON chill_csconnectes.cs_person (documentCI_id)'); - $this->addSql('CREATE INDEX IDX_10864F3134FDF11D ON chill_csconnectes.cs_person (documentTitreSejour_id)'); - $this->addSql('CREATE INDEX IDX_10864F315742C99D ON chill_csconnectes.cs_person (documentAttestationFiscale_id)'); - $this->addSql('CREATE INDEX IDX_10864F31166494D4 ON chill_csconnectes.cs_person (documentPermis_id)'); - $this->addSql('CREATE INDEX IDX_10864F3172820D66 ON chill_csconnectes.cs_person (documentAttestationCAAF_id)'); - $this->addSql('CREATE INDEX IDX_10864F31AFA5E636 ON chill_csconnectes.cs_person (documentContraTravail_id)'); - $this->addSql('CREATE INDEX IDX_10864F3161E05C22 ON chill_csconnectes.cs_person (documentAttestationFormation_id)'); - $this->addSql('CREATE INDEX IDX_10864F316F744BB0 ON chill_csconnectes.cs_person (documentQuittanceLoyer_id)'); - $this->addSql('CREATE INDEX IDX_10864F31AC39B1B ON chill_csconnectes.cs_person (documentFactureElectricite_id)'); - $this->addSql('CREATE INDEX IDX_10864F3172A75B6D ON chill_csconnectes.cs_person (documentAttestationSecuriteSociale_id)'); - $this->addSql('CREATE INDEX IDX_10864F31D486E642 ON chill_csconnectes.cs_person (prescripteur_id)'); - $this->addSql('CREATE TABLE chill_csconnectes.cv (id INT NOT NULL, person_id INT DEFAULT NULL, reportDate DATE NOT NULL, formationLevel VARCHAR(255) DEFAULT NULL, formationType VARCHAR(255) DEFAULT NULL, spokenLanguages JSON DEFAULT NULL, notes TEXT DEFAULT NULL, PRIMARY KEY(id))'); - $this->addSql('CREATE INDEX IDX_3F24F812217BBB47 ON chill_csconnectes.cv (person_id)'); - $this->addSql('CREATE TABLE chill_csconnectes.cv_experience (id INT NOT NULL, poste TEXT DEFAULT NULL, structure TEXT DEFAULT NULL, startDate DATE DEFAULT NULL, endDate DATE DEFAULT NULL, contratType VARCHAR(100) NOT NULL, notes TEXT DEFAULT NULL, CV_id INT DEFAULT NULL, PRIMARY KEY(id))'); - $this->addSql('CREATE INDEX IDX_102A1262AE1799D8 ON chill_csconnectes.cv_experience (CV_id)'); - $this->addSql('CREATE TABLE chill_csconnectes.cv_formation (id INT NOT NULL, title TEXT NOT NULL, startDate DATE DEFAULT NULL, endDate DATE DEFAULT NULL, diplomaObtained VARCHAR(255) DEFAULT NULL, diplomaReconnue VARCHAR(50) DEFAULT NULL, organisme TEXT DEFAULT NULL, CV_id INT DEFAULT NULL, PRIMARY KEY(id))'); - $this->addSql('CREATE INDEX IDX_20BE09E2AE1799D8 ON chill_csconnectes.cv_formation (CV_id)'); - $this->addSql('CREATE TABLE chill_csconnectes.frein (id INT NOT NULL, reportDate DATE NOT NULL, freinsPerso JSON NOT NULL, notesPerso TEXT NOT NULL, freinsEmploi JSON NOT NULL, notesEmploi TEXT NOT NULL, PRIMARY KEY(id))'); - $this->addSql('CREATE TABLE chill_csconnectes.immersion (id INT NOT NULL, entreprise_id INT DEFAULT NULL, referent_id INT DEFAULT NULL, domaineActivite TEXT DEFAULT NULL, tuteurName TEXT DEFAULT NULL, tuteurFonction TEXT DEFAULT NULL, tuteurPhoneNumber TEXT DEFAULT NULL, structureAccName TEXT DEFAULT NULL, structureAccPhonenumber TEXT DEFAULT NULL, structureAccEmail TEXT DEFAULT NULL, posteDescriptif TEXT DEFAULT NULL, posteTitle TEXT DEFAULT NULL, posteLieu TEXT DEFAULT NULL, debutDate DATE DEFAULT NULL, duration INTERVAL DEFAULT NULL, horaire TEXT DEFAULT NULL, objectifs JSON DEFAULT NULL, objectifsAutre TEXT DEFAULT NULL, is_bilan_fullfilled BOOLEAN DEFAULT false NOT NULL, savoirEtre JSON DEFAULT NULL, savoirEtreNote TEXT DEFAULT NULL, noteimmersion TEXT NOT NULL, principalesActivites TEXT DEFAULT NULL, competencesAcquises TEXT DEFAULT NULL, competencesADevelopper TEXT DEFAULT NULL, noteBilan TEXT DEFAULT NULL, ponctualite_salarie TEXT DEFAULT NULL, ponctualite_salarie_note TEXT DEFAULT NULL, assiduite TEXT DEFAULT NULL, assiduite_note TEXT DEFAULT NULL, interet_activite TEXT DEFAULT NULL, interet_activite_note TEXT DEFAULT NULL, integre_regle TEXT DEFAULT NULL, integre_regle_note TEXT DEFAULT NULL, esprit_initiative TEXT DEFAULT NULL, esprit_initiative_note TEXT DEFAULT NULL, organisation TEXT DEFAULT NULL, organisation_note TEXT DEFAULT NULL, capacite_travail_equipe TEXT DEFAULT NULL, capacite_travail_equipe_note TEXT DEFAULT NULL, style_vestimentaire TEXT DEFAULT NULL, style_vestimentaire_note TEXT DEFAULT NULL, langage_prof TEXT DEFAULT NULL, langage_prof_note TEXT DEFAULT NULL, applique_consigne TEXT DEFAULT NULL, applique_consigne_note TEXT DEFAULT NULL, respect_hierarchie TEXT DEFAULT NULL, respect_hierarchie_note TEXT DEFAULT NULL, structureAccAddress_id INT DEFAULT NULL, PRIMARY KEY(id))'); - $this->addSql('CREATE INDEX IDX_FBB3CBB4A4AEAFEA ON chill_csconnectes.immersion (entreprise_id)'); - $this->addSql('CREATE INDEX IDX_FBB3CBB435E47E35 ON chill_csconnectes.immersion (referent_id)'); - $this->addSql('CREATE INDEX IDX_FBB3CBB4B5E04267 ON chill_csconnectes.immersion (structureAccAddress_id)'); - $this->addSql('COMMENT ON COLUMN chill_csconnectes.immersion.duration IS \'(DC2Type:dateinterval)\''); - $this->addSql('CREATE TABLE chill_csconnectes.projet_professionnel (id INT NOT NULL, reportDate DATE NOT NULL, domaineActiviteSouhait TEXT DEFAULT NULL, typeContrat JSON DEFAULT NULL, typeContratNotes TEXT DEFAULT NULL, volumeHoraire JSON DEFAULT NULL, volumeHoraireNotes TEXT DEFAULT NULL, idee TEXT DEFAULT NULL, enCoursConstruction TEXT DEFAULT NULL, domaineActiviteValide TEXT DEFAULT NULL, valideNotes TEXT DEFAULT NULL, projetProfessionnelNote TEXT DEFAULT NULL, PRIMARY KEY(id))'); - $this->addSql('CREATE TABLE chill_csconnectes.projetprofessionnel_souhait (projetprofessionnel_id INT NOT NULL, appellation_id INT NOT NULL, PRIMARY KEY(projetprofessionnel_id, appellation_id))'); - $this->addSql('CREATE INDEX IDX_3280B96DB87BF7B5 ON chill_csconnectes.projetprofessionnel_souhait (projetprofessionnel_id)'); - $this->addSql('CREATE INDEX IDX_3280B96D7CDE30DD ON chill_csconnectes.projetprofessionnel_souhait (appellation_id)'); - $this->addSql('CREATE TABLE chill_csconnectes.projetprofessionnel_valide (projetprofessionnel_id INT NOT NULL, appellation_id INT NOT NULL, PRIMARY KEY(projetprofessionnel_id, appellation_id))'); - $this->addSql('CREATE INDEX IDX_E0501BE0B87BF7B5 ON chill_csconnectes.projetprofessionnel_valide (projetprofessionnel_id)'); - $this->addSql('CREATE INDEX IDX_E0501BE07CDE30DD ON chill_csconnectes.projetprofessionnel_valide (appellation_id)'); - $this->addSql('CREATE TABLE chill_csconnectes.rome_appellation (id INT NOT NULL, metier_id INT DEFAULT NULL, code VARCHAR(40) NOT NULL, libelle TEXT NOT NULL, PRIMARY KEY(id))'); - $this->addSql('CREATE UNIQUE INDEX UNIQ_D9E9CABC77153098 ON chill_csconnectes.rome_appellation (code)'); - $this->addSql('CREATE INDEX IDX_D9E9CABCED16FA20 ON chill_csconnectes.rome_appellation (metier_id)'); - $this->addSql('CREATE TABLE chill_csconnectes.rome_metier (id INT NOT NULL, libelle TEXT NOT NULL, code VARCHAR(20) NOT NULL, PRIMARY KEY(id))'); - $this->addSql('CREATE UNIQUE INDEX UNIQ_3274952577153098 ON chill_csconnectes.rome_metier (code)'); - $this->addSql('ALTER TABLE chill_csconnectes.cs_person ADD CONSTRAINT FK_10864F31217BBB47 FOREIGN KEY (person_id) REFERENCES chill_person_person (id) NOT DEFERRABLE INITIALLY IMMEDIATE'); - $this->addSql('ALTER TABLE chill_csconnectes.cs_person ADD CONSTRAINT FK_10864F312654B57D FOREIGN KEY (handicapAccompagnement_id) REFERENCES chill_3party.third_party (id) NOT DEFERRABLE INITIALLY IMMEDIATE'); - $this->addSql('ALTER TABLE chill_csconnectes.cs_person ADD CONSTRAINT FK_10864F3154866550 FOREIGN KEY (documentCV_id) REFERENCES chill_doc.stored_object (id) NOT DEFERRABLE INITIALLY IMMEDIATE'); - $this->addSql('ALTER TABLE chill_csconnectes.cs_person ADD CONSTRAINT FK_10864F318825E118 FOREIGN KEY (documentAgrementIAE_id) REFERENCES chill_doc.stored_object (id) NOT DEFERRABLE INITIALLY IMMEDIATE'); - $this->addSql('ALTER TABLE chill_csconnectes.cs_person ADD CONSTRAINT FK_10864F31A396AFAC FOREIGN KEY (documentRQTH_id) REFERENCES chill_doc.stored_object (id) NOT DEFERRABLE INITIALLY IMMEDIATE'); - $this->addSql('ALTER TABLE chill_csconnectes.cs_person ADD CONSTRAINT FK_10864F3187541764 FOREIGN KEY (documentAttestationNEET_id) REFERENCES chill_doc.stored_object (id) NOT DEFERRABLE INITIALLY IMMEDIATE'); - $this->addSql('ALTER TABLE chill_csconnectes.cs_person ADD CONSTRAINT FK_10864F315CFC2299 FOREIGN KEY (documentCI_id) REFERENCES chill_doc.stored_object (id) NOT DEFERRABLE INITIALLY IMMEDIATE'); - $this->addSql('ALTER TABLE chill_csconnectes.cs_person ADD CONSTRAINT FK_10864F3134FDF11D FOREIGN KEY (documentTitreSejour_id) REFERENCES chill_doc.stored_object (id) NOT DEFERRABLE INITIALLY IMMEDIATE'); - $this->addSql('ALTER TABLE chill_csconnectes.cs_person ADD CONSTRAINT FK_10864F315742C99D FOREIGN KEY (documentAttestationFiscale_id) REFERENCES chill_doc.stored_object (id) NOT DEFERRABLE INITIALLY IMMEDIATE'); - $this->addSql('ALTER TABLE chill_csconnectes.cs_person ADD CONSTRAINT FK_10864F31166494D4 FOREIGN KEY (documentPermis_id) REFERENCES chill_doc.stored_object (id) NOT DEFERRABLE INITIALLY IMMEDIATE'); - $this->addSql('ALTER TABLE chill_csconnectes.cs_person ADD CONSTRAINT FK_10864F3172820D66 FOREIGN KEY (documentAttestationCAAF_id) REFERENCES chill_doc.stored_object (id) NOT DEFERRABLE INITIALLY IMMEDIATE'); - $this->addSql('ALTER TABLE chill_csconnectes.cs_person ADD CONSTRAINT FK_10864F31AFA5E636 FOREIGN KEY (documentContraTravail_id) REFERENCES chill_doc.stored_object (id) NOT DEFERRABLE INITIALLY IMMEDIATE'); - $this->addSql('ALTER TABLE chill_csconnectes.cs_person ADD CONSTRAINT FK_10864F3161E05C22 FOREIGN KEY (documentAttestationFormation_id) REFERENCES chill_doc.stored_object (id) NOT DEFERRABLE INITIALLY IMMEDIATE'); - $this->addSql('ALTER TABLE chill_csconnectes.cs_person ADD CONSTRAINT FK_10864F316F744BB0 FOREIGN KEY (documentQuittanceLoyer_id) REFERENCES chill_doc.stored_object (id) NOT DEFERRABLE INITIALLY IMMEDIATE'); - $this->addSql('ALTER TABLE chill_csconnectes.cs_person ADD CONSTRAINT FK_10864F31AC39B1B FOREIGN KEY (documentFactureElectricite_id) REFERENCES chill_doc.stored_object (id) NOT DEFERRABLE INITIALLY IMMEDIATE'); - $this->addSql('ALTER TABLE chill_csconnectes.cs_person ADD CONSTRAINT FK_10864F3172A75B6D FOREIGN KEY (documentAttestationSecuriteSociale_id) REFERENCES chill_doc.stored_object (id) NOT DEFERRABLE INITIALLY IMMEDIATE'); - $this->addSql('ALTER TABLE chill_csconnectes.cs_person ADD CONSTRAINT FK_10864F31D486E642 FOREIGN KEY (prescripteur_id) REFERENCES chill_3party.third_party (id) NOT DEFERRABLE INITIALLY IMMEDIATE'); - $this->addSql('ALTER TABLE chill_csconnectes.cv ADD CONSTRAINT FK_3F24F812217BBB47 FOREIGN KEY (person_id) REFERENCES chill_person_person (id) NOT DEFERRABLE INITIALLY IMMEDIATE'); - $this->addSql('ALTER TABLE chill_csconnectes.cv_experience ADD CONSTRAINT FK_102A1262AE1799D8 FOREIGN KEY (CV_id) REFERENCES chill_csconnectes.cv (id) NOT DEFERRABLE INITIALLY IMMEDIATE'); - $this->addSql('ALTER TABLE chill_csconnectes.cv_formation ADD CONSTRAINT FK_20BE09E2AE1799D8 FOREIGN KEY (CV_id) REFERENCES chill_csconnectes.cv (id) NOT DEFERRABLE INITIALLY IMMEDIATE'); - $this->addSql('ALTER TABLE chill_csconnectes.immersion ADD CONSTRAINT FK_FBB3CBB4A4AEAFEA FOREIGN KEY (entreprise_id) REFERENCES chill_3party.third_party (id) NOT DEFERRABLE INITIALLY IMMEDIATE'); - $this->addSql('ALTER TABLE chill_csconnectes.immersion ADD CONSTRAINT FK_FBB3CBB435E47E35 FOREIGN KEY (referent_id) REFERENCES users (id) NOT DEFERRABLE INITIALLY IMMEDIATE'); - $this->addSql('ALTER TABLE chill_csconnectes.immersion ADD CONSTRAINT FK_FBB3CBB4B5E04267 FOREIGN KEY (structureAccAddress_id) REFERENCES chill_main_address (id) NOT DEFERRABLE INITIALLY IMMEDIATE'); - $this->addSql('ALTER TABLE chill_csconnectes.projetprofessionnel_souhait ADD CONSTRAINT FK_3280B96DB87BF7B5 FOREIGN KEY (projetprofessionnel_id) REFERENCES chill_csconnectes.projet_professionnel (id) ON DELETE CASCADE NOT DEFERRABLE INITIALLY IMMEDIATE'); - $this->addSql('ALTER TABLE chill_csconnectes.projetprofessionnel_souhait ADD CONSTRAINT FK_3280B96D7CDE30DD FOREIGN KEY (appellation_id) REFERENCES chill_csconnectes.rome_appellation (id) ON DELETE CASCADE NOT DEFERRABLE INITIALLY IMMEDIATE'); - $this->addSql('ALTER TABLE chill_csconnectes.projetprofessionnel_valide ADD CONSTRAINT FK_E0501BE0B87BF7B5 FOREIGN KEY (projetprofessionnel_id) REFERENCES chill_csconnectes.projet_professionnel (id) ON DELETE CASCADE NOT DEFERRABLE INITIALLY IMMEDIATE'); - $this->addSql('ALTER TABLE chill_csconnectes.projetprofessionnel_valide ADD CONSTRAINT FK_E0501BE07CDE30DD FOREIGN KEY (appellation_id) REFERENCES chill_csconnectes.rome_appellation (id) ON DELETE CASCADE NOT DEFERRABLE INITIALLY IMMEDIATE'); - $this->addSql('ALTER TABLE chill_csconnectes.rome_appellation ADD CONSTRAINT FK_D9E9CABCED16FA20 FOREIGN KEY (metier_id) REFERENCES chill_csconnectes.rome_metier (id) NOT DEFERRABLE INITIALLY IMMEDIATE'); + $this->addSql('CREATE SCHEMA chill_job'); + $this->addSql('CREATE SEQUENCE chill_job.cv_id_seq INCREMENT BY 1 MINVALUE 1 START 1'); + $this->addSql('CREATE SEQUENCE chill_job.cv_experience_id_seq INCREMENT BY 1 MINVALUE 1 START 1'); + $this->addSql('CREATE SEQUENCE chill_job.cv_formation_id_seq INCREMENT BY 1 MINVALUE 1 START 1'); + $this->addSql('CREATE SEQUENCE chill_job.frein_id_seq INCREMENT BY 1 MINVALUE 1 START 1'); + $this->addSql('CREATE SEQUENCE chill_job.immersion_id_seq INCREMENT BY 1 MINVALUE 1 START 1'); + $this->addSql('CREATE SEQUENCE chill_job.projet_professionnel_id_seq INCREMENT BY 1 MINVALUE 1 START 1'); + $this->addSql('CREATE SEQUENCE chill_job.rome_appellation_id_seq INCREMENT BY 1 MINVALUE 1 START 1'); + $this->addSql('CREATE SEQUENCE chill_job.rome_metier_id_seq INCREMENT BY 1 MINVALUE 1 START 1'); + $this->addSql('CREATE TABLE chill_job.cs_person (id INT NOT NULL, person_id INT DEFAULT NULL, prescripteur_id INT DEFAULT NULL, situationLogement VARCHAR(255) DEFAULT NULL, situationLogementPrecision TEXT DEFAULT NULL, enfantACharge INT DEFAULT NULL, niveauMaitriseLangue JSON DEFAULT NULL, vehiculePersonnel BOOLEAN DEFAULT NULL, permisConduire JSON DEFAULT NULL, situationProfessionnelle VARCHAR(255) DEFAULT NULL, dateFinDernierEmploi DATE DEFAULT NULL, typeContrat JSON DEFAULT NULL, typeContratAide TEXT DEFAULT NULL, ressources JSON DEFAULT NULL, ressourcesComment TEXT DEFAULT NULL, ressourceDate1Versement DATE DEFAULT NULL, CPFMontant NUMERIC(10, 2) DEFAULT NULL, acomptedif NUMERIC(10, 2) DEFAULT NULL, accompagnement JSON DEFAULT NULL, accompagnementRQTHDate DATE DEFAULT NULL, accompagnementComment VARCHAR(255) DEFAULT NULL, poleEmploiId VARCHAR(255) DEFAULT NULL, poleEmploiInscriptionDate DATE DEFAULT NULL, cafId VARCHAR(255) DEFAULT NULL, cafInscriptionDate DATE DEFAULT NULL, CERInscriptionDate DATE DEFAULT NULL, PPAEInscriptionDate DATE DEFAULT NULL, CERSignataire TEXT DEFAULT NULL, PPAESignataire TEXT DEFAULT NULL, NEETEligibilite VARCHAR(255) DEFAULT NULL, NEETCommissionDate DATE DEFAULT NULL, FSEMaDemarcheCode TEXT DEFAULT NULL, datecontratIEJ DATE DEFAULT NULL, dateavenantIEJ DATE DEFAULT NULL, dispositifs_notes TEXT DEFAULT NULL, handicap BOOLEAN DEFAULT NULL, handicapnotes TEXT DEFAULT NULL, handicapRecommandation VARCHAR(50) DEFAULT NULL, mobilitemoyentransport JSON DEFAULT NULL, mobilitenotes TEXT DEFAULT NULL, handicapAccompagnement_id INT DEFAULT NULL, documentCV_id INT DEFAULT NULL, documentAgrementIAE_id INT DEFAULT NULL, documentRQTH_id INT DEFAULT NULL, documentAttestationNEET_id INT DEFAULT NULL, documentCI_id INT DEFAULT NULL, documentTitreSejour_id INT DEFAULT NULL, documentAttestationFiscale_id INT DEFAULT NULL, documentPermis_id INT DEFAULT NULL, documentAttestationCAAF_id INT DEFAULT NULL, documentContraTravail_id INT DEFAULT NULL, documentAttestationFormation_id INT DEFAULT NULL, documentQuittanceLoyer_id INT DEFAULT NULL, documentFactureElectricite_id INT DEFAULT NULL, documentAttestationSecuriteSociale_id INT DEFAULT NULL, PRIMARY KEY(id))'); + $this->addSql('CREATE UNIQUE INDEX UNIQ_10864F31217BBB47 ON chill_job.cs_person (person_id)'); + $this->addSql('CREATE INDEX IDX_10864F312654B57D ON chill_job.cs_person (handicapAccompagnement_id)'); + $this->addSql('CREATE INDEX IDX_10864F3154866550 ON chill_job.cs_person (documentCV_id)'); + $this->addSql('CREATE INDEX IDX_10864F318825E118 ON chill_job.cs_person (documentAgrementIAE_id)'); + $this->addSql('CREATE INDEX IDX_10864F31A396AFAC ON chill_job.cs_person (documentRQTH_id)'); + $this->addSql('CREATE INDEX IDX_10864F3187541764 ON chill_job.cs_person (documentAttestationNEET_id)'); + $this->addSql('CREATE INDEX IDX_10864F315CFC2299 ON chill_job.cs_person (documentCI_id)'); + $this->addSql('CREATE INDEX IDX_10864F3134FDF11D ON chill_job.cs_person (documentTitreSejour_id)'); + $this->addSql('CREATE INDEX IDX_10864F315742C99D ON chill_job.cs_person (documentAttestationFiscale_id)'); + $this->addSql('CREATE INDEX IDX_10864F31166494D4 ON chill_job.cs_person (documentPermis_id)'); + $this->addSql('CREATE INDEX IDX_10864F3172820D66 ON chill_job.cs_person (documentAttestationCAAF_id)'); + $this->addSql('CREATE INDEX IDX_10864F31AFA5E636 ON chill_job.cs_person (documentContraTravail_id)'); + $this->addSql('CREATE INDEX IDX_10864F3161E05C22 ON chill_job.cs_person (documentAttestationFormation_id)'); + $this->addSql('CREATE INDEX IDX_10864F316F744BB0 ON chill_job.cs_person (documentQuittanceLoyer_id)'); + $this->addSql('CREATE INDEX IDX_10864F31AC39B1B ON chill_job.cs_person (documentFactureElectricite_id)'); + $this->addSql('CREATE INDEX IDX_10864F3172A75B6D ON chill_job.cs_person (documentAttestationSecuriteSociale_id)'); + $this->addSql('CREATE INDEX IDX_10864F31D486E642 ON chill_job.cs_person (prescripteur_id)'); + $this->addSql('CREATE TABLE chill_job.cv (id INT NOT NULL, person_id INT DEFAULT NULL, reportDate DATE NOT NULL, formationLevel VARCHAR(255) DEFAULT NULL, formationType VARCHAR(255) DEFAULT NULL, spokenLanguages JSON DEFAULT NULL, notes TEXT DEFAULT NULL, PRIMARY KEY(id))'); + $this->addSql('CREATE INDEX IDX_3F24F812217BBB47 ON chill_job.cv (person_id)'); + $this->addSql('CREATE TABLE chill_job.cv_experience (id INT NOT NULL, poste TEXT DEFAULT NULL, structure TEXT DEFAULT NULL, startDate DATE DEFAULT NULL, endDate DATE DEFAULT NULL, contratType VARCHAR(100) NOT NULL, notes TEXT DEFAULT NULL, CV_id INT DEFAULT NULL, PRIMARY KEY(id))'); + $this->addSql('CREATE INDEX IDX_102A1262AE1799D8 ON chill_job.cv_experience (CV_id)'); + $this->addSql('CREATE TABLE chill_job.cv_formation (id INT NOT NULL, title TEXT NOT NULL, startDate DATE DEFAULT NULL, endDate DATE DEFAULT NULL, diplomaObtained VARCHAR(255) DEFAULT NULL, diplomaReconnue VARCHAR(50) DEFAULT NULL, organisme TEXT DEFAULT NULL, CV_id INT DEFAULT NULL, PRIMARY KEY(id))'); + $this->addSql('CREATE INDEX IDX_20BE09E2AE1799D8 ON chill_job.cv_formation (CV_id)'); + $this->addSql('CREATE TABLE chill_job.frein (id INT NOT NULL, reportDate DATE NOT NULL, freinsPerso JSON NOT NULL, notesPerso TEXT NOT NULL, freinsEmploi JSON NOT NULL, notesEmploi TEXT NOT NULL, PRIMARY KEY(id))'); + $this->addSql('CREATE TABLE chill_job.immersion (id INT NOT NULL, entreprise_id INT DEFAULT NULL, referent_id INT DEFAULT NULL, domaineActivite TEXT DEFAULT NULL, tuteurName TEXT DEFAULT NULL, tuteurFonction TEXT DEFAULT NULL, tuteurPhoneNumber TEXT DEFAULT NULL, structureAccName TEXT DEFAULT NULL, structureAccPhonenumber TEXT DEFAULT NULL, structureAccEmail TEXT DEFAULT NULL, posteDescriptif TEXT DEFAULT NULL, posteTitle TEXT DEFAULT NULL, posteLieu TEXT DEFAULT NULL, debutDate DATE DEFAULT NULL, duration INTERVAL DEFAULT NULL, horaire TEXT DEFAULT NULL, objectifs JSON DEFAULT NULL, objectifsAutre TEXT DEFAULT NULL, is_bilan_fullfilled BOOLEAN DEFAULT false NOT NULL, savoirEtre JSON DEFAULT NULL, savoirEtreNote TEXT DEFAULT NULL, noteimmersion TEXT NOT NULL, principalesActivites TEXT DEFAULT NULL, competencesAcquises TEXT DEFAULT NULL, competencesADevelopper TEXT DEFAULT NULL, noteBilan TEXT DEFAULT NULL, ponctualite_salarie TEXT DEFAULT NULL, ponctualite_salarie_note TEXT DEFAULT NULL, assiduite TEXT DEFAULT NULL, assiduite_note TEXT DEFAULT NULL, interet_activite TEXT DEFAULT NULL, interet_activite_note TEXT DEFAULT NULL, integre_regle TEXT DEFAULT NULL, integre_regle_note TEXT DEFAULT NULL, esprit_initiative TEXT DEFAULT NULL, esprit_initiative_note TEXT DEFAULT NULL, organisation TEXT DEFAULT NULL, organisation_note TEXT DEFAULT NULL, capacite_travail_equipe TEXT DEFAULT NULL, capacite_travail_equipe_note TEXT DEFAULT NULL, style_vestimentaire TEXT DEFAULT NULL, style_vestimentaire_note TEXT DEFAULT NULL, langage_prof TEXT DEFAULT NULL, langage_prof_note TEXT DEFAULT NULL, applique_consigne TEXT DEFAULT NULL, applique_consigne_note TEXT DEFAULT NULL, respect_hierarchie TEXT DEFAULT NULL, respect_hierarchie_note TEXT DEFAULT NULL, structureAccAddress_id INT DEFAULT NULL, PRIMARY KEY(id))'); + $this->addSql('CREATE INDEX IDX_FBB3CBB4A4AEAFEA ON chill_job.immersion (entreprise_id)'); + $this->addSql('CREATE INDEX IDX_FBB3CBB435E47E35 ON chill_job.immersion (referent_id)'); + $this->addSql('CREATE INDEX IDX_FBB3CBB4B5E04267 ON chill_job.immersion (structureAccAddress_id)'); + $this->addSql('COMMENT ON COLUMN chill_job.immersion.duration IS \'(DC2Type:dateinterval)\''); + $this->addSql('CREATE TABLE chill_job.projet_professionnel (id INT NOT NULL, reportDate DATE NOT NULL, domaineActiviteSouhait TEXT DEFAULT NULL, typeContrat JSON DEFAULT NULL, typeContratNotes TEXT DEFAULT NULL, volumeHoraire JSON DEFAULT NULL, volumeHoraireNotes TEXT DEFAULT NULL, idee TEXT DEFAULT NULL, enCoursConstruction TEXT DEFAULT NULL, domaineActiviteValide TEXT DEFAULT NULL, valideNotes TEXT DEFAULT NULL, projetProfessionnelNote TEXT DEFAULT NULL, PRIMARY KEY(id))'); + $this->addSql('CREATE TABLE chill_job.projetprofessionnel_souhait (projetprofessionnel_id INT NOT NULL, appellation_id INT NOT NULL, PRIMARY KEY(projetprofessionnel_id, appellation_id))'); + $this->addSql('CREATE INDEX IDX_3280B96DB87BF7B5 ON chill_job.projetprofessionnel_souhait (projetprofessionnel_id)'); + $this->addSql('CREATE INDEX IDX_3280B96D7CDE30DD ON chill_job.projetprofessionnel_souhait (appellation_id)'); + $this->addSql('CREATE TABLE chill_job.projetprofessionnel_valide (projetprofessionnel_id INT NOT NULL, appellation_id INT NOT NULL, PRIMARY KEY(projetprofessionnel_id, appellation_id))'); + $this->addSql('CREATE INDEX IDX_E0501BE0B87BF7B5 ON chill_job.projetprofessionnel_valide (projetprofessionnel_id)'); + $this->addSql('CREATE INDEX IDX_E0501BE07CDE30DD ON chill_job.projetprofessionnel_valide (appellation_id)'); + $this->addSql('CREATE TABLE chill_job.rome_appellation (id INT NOT NULL, metier_id INT DEFAULT NULL, code VARCHAR(40) NOT NULL, libelle TEXT NOT NULL, PRIMARY KEY(id))'); + $this->addSql('CREATE UNIQUE INDEX UNIQ_D9E9CABC77153098 ON chill_job.rome_appellation (code)'); + $this->addSql('CREATE INDEX IDX_D9E9CABCED16FA20 ON chill_job.rome_appellation (metier_id)'); + $this->addSql('CREATE TABLE chill_job.rome_metier (id INT NOT NULL, libelle TEXT NOT NULL, code VARCHAR(20) NOT NULL, PRIMARY KEY(id))'); + $this->addSql('CREATE UNIQUE INDEX UNIQ_3274952577153098 ON chill_job.rome_metier (code)'); + $this->addSql('ALTER TABLE chill_job.cs_person ADD CONSTRAINT FK_10864F31217BBB47 FOREIGN KEY (person_id) REFERENCES chill_person_person (id) NOT DEFERRABLE INITIALLY IMMEDIATE'); + $this->addSql('ALTER TABLE chill_job.cs_person ADD CONSTRAINT FK_10864F312654B57D FOREIGN KEY (handicapAccompagnement_id) REFERENCES chill_3party.third_party (id) NOT DEFERRABLE INITIALLY IMMEDIATE'); + $this->addSql('ALTER TABLE chill_job.cs_person ADD CONSTRAINT FK_10864F3154866550 FOREIGN KEY (documentCV_id) REFERENCES chill_doc.stored_object (id) NOT DEFERRABLE INITIALLY IMMEDIATE'); + $this->addSql('ALTER TABLE chill_job.cs_person ADD CONSTRAINT FK_10864F318825E118 FOREIGN KEY (documentAgrementIAE_id) REFERENCES chill_doc.stored_object (id) NOT DEFERRABLE INITIALLY IMMEDIATE'); + $this->addSql('ALTER TABLE chill_job.cs_person ADD CONSTRAINT FK_10864F31A396AFAC FOREIGN KEY (documentRQTH_id) REFERENCES chill_doc.stored_object (id) NOT DEFERRABLE INITIALLY IMMEDIATE'); + $this->addSql('ALTER TABLE chill_job.cs_person ADD CONSTRAINT FK_10864F3187541764 FOREIGN KEY (documentAttestationNEET_id) REFERENCES chill_doc.stored_object (id) NOT DEFERRABLE INITIALLY IMMEDIATE'); + $this->addSql('ALTER TABLE chill_job.cs_person ADD CONSTRAINT FK_10864F315CFC2299 FOREIGN KEY (documentCI_id) REFERENCES chill_doc.stored_object (id) NOT DEFERRABLE INITIALLY IMMEDIATE'); + $this->addSql('ALTER TABLE chill_job.cs_person ADD CONSTRAINT FK_10864F3134FDF11D FOREIGN KEY (documentTitreSejour_id) REFERENCES chill_doc.stored_object (id) NOT DEFERRABLE INITIALLY IMMEDIATE'); + $this->addSql('ALTER TABLE chill_job.cs_person ADD CONSTRAINT FK_10864F315742C99D FOREIGN KEY (documentAttestationFiscale_id) REFERENCES chill_doc.stored_object (id) NOT DEFERRABLE INITIALLY IMMEDIATE'); + $this->addSql('ALTER TABLE chill_job.cs_person ADD CONSTRAINT FK_10864F31166494D4 FOREIGN KEY (documentPermis_id) REFERENCES chill_doc.stored_object (id) NOT DEFERRABLE INITIALLY IMMEDIATE'); + $this->addSql('ALTER TABLE chill_job.cs_person ADD CONSTRAINT FK_10864F3172820D66 FOREIGN KEY (documentAttestationCAAF_id) REFERENCES chill_doc.stored_object (id) NOT DEFERRABLE INITIALLY IMMEDIATE'); + $this->addSql('ALTER TABLE chill_job.cs_person ADD CONSTRAINT FK_10864F31AFA5E636 FOREIGN KEY (documentContraTravail_id) REFERENCES chill_doc.stored_object (id) NOT DEFERRABLE INITIALLY IMMEDIATE'); + $this->addSql('ALTER TABLE chill_job.cs_person ADD CONSTRAINT FK_10864F3161E05C22 FOREIGN KEY (documentAttestationFormation_id) REFERENCES chill_doc.stored_object (id) NOT DEFERRABLE INITIALLY IMMEDIATE'); + $this->addSql('ALTER TABLE chill_job.cs_person ADD CONSTRAINT FK_10864F316F744BB0 FOREIGN KEY (documentQuittanceLoyer_id) REFERENCES chill_doc.stored_object (id) NOT DEFERRABLE INITIALLY IMMEDIATE'); + $this->addSql('ALTER TABLE chill_job.cs_person ADD CONSTRAINT FK_10864F31AC39B1B FOREIGN KEY (documentFactureElectricite_id) REFERENCES chill_doc.stored_object (id) NOT DEFERRABLE INITIALLY IMMEDIATE'); + $this->addSql('ALTER TABLE chill_job.cs_person ADD CONSTRAINT FK_10864F3172A75B6D FOREIGN KEY (documentAttestationSecuriteSociale_id) REFERENCES chill_doc.stored_object (id) NOT DEFERRABLE INITIALLY IMMEDIATE'); + $this->addSql('ALTER TABLE chill_job.cs_person ADD CONSTRAINT FK_10864F31D486E642 FOREIGN KEY (prescripteur_id) REFERENCES chill_3party.third_party (id) NOT DEFERRABLE INITIALLY IMMEDIATE'); + $this->addSql('ALTER TABLE chill_job.cv ADD CONSTRAINT FK_3F24F812217BBB47 FOREIGN KEY (person_id) REFERENCES chill_person_person (id) NOT DEFERRABLE INITIALLY IMMEDIATE'); + $this->addSql('ALTER TABLE chill_job.cv_experience ADD CONSTRAINT FK_102A1262AE1799D8 FOREIGN KEY (CV_id) REFERENCES chill_job.cv (id) NOT DEFERRABLE INITIALLY IMMEDIATE'); + $this->addSql('ALTER TABLE chill_job.cv_formation ADD CONSTRAINT FK_20BE09E2AE1799D8 FOREIGN KEY (CV_id) REFERENCES chill_job.cv (id) NOT DEFERRABLE INITIALLY IMMEDIATE'); + $this->addSql('ALTER TABLE chill_job.immersion ADD CONSTRAINT FK_FBB3CBB4A4AEAFEA FOREIGN KEY (entreprise_id) REFERENCES chill_3party.third_party (id) NOT DEFERRABLE INITIALLY IMMEDIATE'); + $this->addSql('ALTER TABLE chill_job.immersion ADD CONSTRAINT FK_FBB3CBB435E47E35 FOREIGN KEY (referent_id) REFERENCES users (id) NOT DEFERRABLE INITIALLY IMMEDIATE'); + $this->addSql('ALTER TABLE chill_job.immersion ADD CONSTRAINT FK_FBB3CBB4B5E04267 FOREIGN KEY (structureAccAddress_id) REFERENCES chill_main_address (id) NOT DEFERRABLE INITIALLY IMMEDIATE'); + $this->addSql('ALTER TABLE chill_job.projetprofessionnel_souhait ADD CONSTRAINT FK_3280B96DB87BF7B5 FOREIGN KEY (projetprofessionnel_id) REFERENCES chill_job.projet_professionnel (id) ON DELETE CASCADE NOT DEFERRABLE INITIALLY IMMEDIATE'); + $this->addSql('ALTER TABLE chill_job.projetprofessionnel_souhait ADD CONSTRAINT FK_3280B96D7CDE30DD FOREIGN KEY (appellation_id) REFERENCES chill_job.rome_appellation (id) ON DELETE CASCADE NOT DEFERRABLE INITIALLY IMMEDIATE'); + $this->addSql('ALTER TABLE chill_job.projetprofessionnel_valide ADD CONSTRAINT FK_E0501BE0B87BF7B5 FOREIGN KEY (projetprofessionnel_id) REFERENCES chill_job.projet_professionnel (id) ON DELETE CASCADE NOT DEFERRABLE INITIALLY IMMEDIATE'); + $this->addSql('ALTER TABLE chill_job.projetprofessionnel_valide ADD CONSTRAINT FK_E0501BE07CDE30DD FOREIGN KEY (appellation_id) REFERENCES chill_job.rome_appellation (id) ON DELETE CASCADE NOT DEFERRABLE INITIALLY IMMEDIATE'); + $this->addSql('ALTER TABLE chill_job.rome_appellation ADD CONSTRAINT FK_D9E9CABCED16FA20 FOREIGN KEY (metier_id) REFERENCES chill_job.rome_metier (id) NOT DEFERRABLE INITIALLY IMMEDIATE'); } public function down(Schema $schema): void { - $this->addSql('DROP SEQUENCE chill_csconnectes.cv_id_seq CASCADE'); - $this->addSql('DROP SEQUENCE chill_csconnectes.cv_experience_id_seq CASCADE'); - $this->addSql('DROP SEQUENCE chill_csconnectes.cv_formation_id_seq CASCADE'); - $this->addSql('DROP SEQUENCE chill_csconnectes.frein_id_seq CASCADE'); - $this->addSql('DROP SEQUENCE chill_csconnectes.immersion_id_seq CASCADE'); - $this->addSql('DROP SEQUENCE chill_csconnectes.projet_professionnel_id_seq CASCADE'); - $this->addSql('DROP SEQUENCE chill_csconnectes.rome_appellation_id_seq CASCADE'); - $this->addSql('DROP SEQUENCE chill_csconnectes.rome_metier_id_seq CASCADE'); - $this->addSql('ALTER TABLE chill_csconnectes.cs_person DROP CONSTRAINT FK_10864F31217BBB47'); - $this->addSql('ALTER TABLE chill_csconnectes.cs_person DROP CONSTRAINT FK_10864F312654B57D'); - $this->addSql('ALTER TABLE chill_csconnectes.cs_person DROP CONSTRAINT FK_10864F3154866550'); - $this->addSql('ALTER TABLE chill_csconnectes.cs_person DROP CONSTRAINT FK_10864F318825E118'); - $this->addSql('ALTER TABLE chill_csconnectes.cs_person DROP CONSTRAINT FK_10864F31A396AFAC'); - $this->addSql('ALTER TABLE chill_csconnectes.cs_person DROP CONSTRAINT FK_10864F3187541764'); - $this->addSql('ALTER TABLE chill_csconnectes.cs_person DROP CONSTRAINT FK_10864F315CFC2299'); - $this->addSql('ALTER TABLE chill_csconnectes.cs_person DROP CONSTRAINT FK_10864F3134FDF11D'); - $this->addSql('ALTER TABLE chill_csconnectes.cs_person DROP CONSTRAINT FK_10864F315742C99D'); - $this->addSql('ALTER TABLE chill_csconnectes.cs_person DROP CONSTRAINT FK_10864F31166494D4'); - $this->addSql('ALTER TABLE chill_csconnectes.cs_person DROP CONSTRAINT FK_10864F3172820D66'); - $this->addSql('ALTER TABLE chill_csconnectes.cs_person DROP CONSTRAINT FK_10864F31AFA5E636'); - $this->addSql('ALTER TABLE chill_csconnectes.cs_person DROP CONSTRAINT FK_10864F3161E05C22'); - $this->addSql('ALTER TABLE chill_csconnectes.cs_person DROP CONSTRAINT FK_10864F316F744BB0'); - $this->addSql('ALTER TABLE chill_csconnectes.cs_person DROP CONSTRAINT FK_10864F31AC39B1B'); - $this->addSql('ALTER TABLE chill_csconnectes.cs_person DROP CONSTRAINT FK_10864F3172A75B6D'); - $this->addSql('ALTER TABLE chill_csconnectes.cs_person DROP CONSTRAINT FK_10864F31D486E642'); - $this->addSql('ALTER TABLE chill_csconnectes.cv DROP CONSTRAINT FK_3F24F812217BBB47'); - $this->addSql('ALTER TABLE chill_csconnectes.cv_experience DROP CONSTRAINT FK_102A1262AE1799D8'); - $this->addSql('ALTER TABLE chill_csconnectes.cv_formation DROP CONSTRAINT FK_20BE09E2AE1799D8'); - $this->addSql('ALTER TABLE chill_csconnectes.immersion DROP CONSTRAINT FK_FBB3CBB4A4AEAFEA'); - $this->addSql('ALTER TABLE chill_csconnectes.immersion DROP CONSTRAINT FK_FBB3CBB435E47E35'); - $this->addSql('ALTER TABLE chill_csconnectes.immersion DROP CONSTRAINT FK_FBB3CBB4B5E04267'); - $this->addSql('ALTER TABLE chill_csconnectes.projetprofessionnel_souhait DROP CONSTRAINT FK_3280B96DB87BF7B5'); - $this->addSql('ALTER TABLE chill_csconnectes.projetprofessionnel_souhait DROP CONSTRAINT FK_3280B96D7CDE30DD'); - $this->addSql('ALTER TABLE chill_csconnectes.projetprofessionnel_valide DROP CONSTRAINT FK_E0501BE0B87BF7B5'); - $this->addSql('ALTER TABLE chill_csconnectes.projetprofessionnel_valide DROP CONSTRAINT FK_E0501BE07CDE30DD'); - $this->addSql('ALTER TABLE chill_csconnectes.rome_appellation DROP CONSTRAINT FK_D9E9CABCED16FA20'); - $this->addSql('DROP TABLE chill_csconnectes.cs_person'); - $this->addSql('DROP TABLE chill_csconnectes.cv'); - $this->addSql('DROP TABLE chill_csconnectes.cv_experience'); - $this->addSql('DROP TABLE chill_csconnectes.cv_formation'); - $this->addSql('DROP TABLE chill_csconnectes.frein'); - $this->addSql('DROP TABLE chill_csconnectes.immersion'); - $this->addSql('DROP TABLE chill_csconnectes.projet_professionnel'); - $this->addSql('DROP TABLE chill_csconnectes.projetprofessionnel_souhait'); - $this->addSql('DROP TABLE chill_csconnectes.projetprofessionnel_valide'); - $this->addSql('DROP TABLE chill_csconnectes.rome_appellation'); - $this->addSql('DROP TABLE chill_csconnectes.rome_metier'); - $this->addSql('DROP SCHEMA chill_csconnectes'); + $this->addSql('DROP SEQUENCE chill_job.cv_id_seq CASCADE'); + $this->addSql('DROP SEQUENCE chill_job.cv_experience_id_seq CASCADE'); + $this->addSql('DROP SEQUENCE chill_job.cv_formation_id_seq CASCADE'); + $this->addSql('DROP SEQUENCE chill_job.frein_id_seq CASCADE'); + $this->addSql('DROP SEQUENCE chill_job.immersion_id_seq CASCADE'); + $this->addSql('DROP SEQUENCE chill_job.projet_professionnel_id_seq CASCADE'); + $this->addSql('DROP SEQUENCE chill_job.rome_appellation_id_seq CASCADE'); + $this->addSql('DROP SEQUENCE chill_job.rome_metier_id_seq CASCADE'); + $this->addSql('ALTER TABLE chill_job.cs_person DROP CONSTRAINT FK_10864F31217BBB47'); + $this->addSql('ALTER TABLE chill_job.cs_person DROP CONSTRAINT FK_10864F312654B57D'); + $this->addSql('ALTER TABLE chill_job.cs_person DROP CONSTRAINT FK_10864F3154866550'); + $this->addSql('ALTER TABLE chill_job.cs_person DROP CONSTRAINT FK_10864F318825E118'); + $this->addSql('ALTER TABLE chill_job.cs_person DROP CONSTRAINT FK_10864F31A396AFAC'); + $this->addSql('ALTER TABLE chill_job.cs_person DROP CONSTRAINT FK_10864F3187541764'); + $this->addSql('ALTER TABLE chill_job.cs_person DROP CONSTRAINT FK_10864F315CFC2299'); + $this->addSql('ALTER TABLE chill_job.cs_person DROP CONSTRAINT FK_10864F3134FDF11D'); + $this->addSql('ALTER TABLE chill_job.cs_person DROP CONSTRAINT FK_10864F315742C99D'); + $this->addSql('ALTER TABLE chill_job.cs_person DROP CONSTRAINT FK_10864F31166494D4'); + $this->addSql('ALTER TABLE chill_job.cs_person DROP CONSTRAINT FK_10864F3172820D66'); + $this->addSql('ALTER TABLE chill_job.cs_person DROP CONSTRAINT FK_10864F31AFA5E636'); + $this->addSql('ALTER TABLE chill_job.cs_person DROP CONSTRAINT FK_10864F3161E05C22'); + $this->addSql('ALTER TABLE chill_job.cs_person DROP CONSTRAINT FK_10864F316F744BB0'); + $this->addSql('ALTER TABLE chill_job.cs_person DROP CONSTRAINT FK_10864F31AC39B1B'); + $this->addSql('ALTER TABLE chill_job.cs_person DROP CONSTRAINT FK_10864F3172A75B6D'); + $this->addSql('ALTER TABLE chill_job.cs_person DROP CONSTRAINT FK_10864F31D486E642'); + $this->addSql('ALTER TABLE chill_job.cv DROP CONSTRAINT FK_3F24F812217BBB47'); + $this->addSql('ALTER TABLE chill_job.cv_experience DROP CONSTRAINT FK_102A1262AE1799D8'); + $this->addSql('ALTER TABLE chill_job.cv_formation DROP CONSTRAINT FK_20BE09E2AE1799D8'); + $this->addSql('ALTER TABLE chill_job.immersion DROP CONSTRAINT FK_FBB3CBB4A4AEAFEA'); + $this->addSql('ALTER TABLE chill_job.immersion DROP CONSTRAINT FK_FBB3CBB435E47E35'); + $this->addSql('ALTER TABLE chill_job.immersion DROP CONSTRAINT FK_FBB3CBB4B5E04267'); + $this->addSql('ALTER TABLE chill_job.projetprofessionnel_souhait DROP CONSTRAINT FK_3280B96DB87BF7B5'); + $this->addSql('ALTER TABLE chill_job.projetprofessionnel_souhait DROP CONSTRAINT FK_3280B96D7CDE30DD'); + $this->addSql('ALTER TABLE chill_job.projetprofessionnel_valide DROP CONSTRAINT FK_E0501BE0B87BF7B5'); + $this->addSql('ALTER TABLE chill_job.projetprofessionnel_valide DROP CONSTRAINT FK_E0501BE07CDE30DD'); + $this->addSql('ALTER TABLE chill_job.rome_appellation DROP CONSTRAINT FK_D9E9CABCED16FA20'); + $this->addSql('DROP TABLE chill_job.cs_person'); + $this->addSql('DROP TABLE chill_job.cv'); + $this->addSql('DROP TABLE chill_job.cv_experience'); + $this->addSql('DROP TABLE chill_job.cv_formation'); + $this->addSql('DROP TABLE chill_job.frein'); + $this->addSql('DROP TABLE chill_job.immersion'); + $this->addSql('DROP TABLE chill_job.projet_professionnel'); + $this->addSql('DROP TABLE chill_job.projetprofessionnel_souhait'); + $this->addSql('DROP TABLE chill_job.projetprofessionnel_valide'); + $this->addSql('DROP TABLE chill_job.rome_appellation'); + $this->addSql('DROP TABLE chill_job.rome_metier'); + $this->addSql('DROP SCHEMA chill_job'); } } diff --git a/src/Bundle/ChillJobBundle/src/migrations/Version20240424140641.php b/src/Bundle/ChillJobBundle/src/migrations/Version20240424140641.php index 5381199ff..1e4fcf7cb 100644 --- a/src/Bundle/ChillJobBundle/src/migrations/Version20240424140641.php +++ b/src/Bundle/ChillJobBundle/src/migrations/Version20240424140641.php @@ -16,24 +16,24 @@ final class Version20240424140641 extends AbstractMigration public function up(Schema $schema): void { - $this->addSql('ALTER TABLE chill_csconnectes.frein ADD person_id INT DEFAULT NULL'); - $this->addSql('ALTER TABLE chill_csconnectes.frein ADD CONSTRAINT FK_172EAC0A217BBB47 FOREIGN KEY (person_id) REFERENCES chill_person_person (id) NOT DEFERRABLE INITIALLY IMMEDIATE'); - $this->addSql('CREATE INDEX IDX_172EAC0A217BBB47 ON chill_csconnectes.frein (person_id)'); - $this->addSql('ALTER TABLE chill_csconnectes.immersion ADD person_id INT DEFAULT NULL'); - $this->addSql('ALTER TABLE chill_csconnectes.immersion ADD CONSTRAINT FK_FBB3CBB4217BBB47 FOREIGN KEY (person_id) REFERENCES chill_person_person (id) NOT DEFERRABLE INITIALLY IMMEDIATE'); - $this->addSql('CREATE INDEX IDX_FBB3CBB4217BBB47 ON chill_csconnectes.immersion (person_id)'); - $this->addSql('ALTER TABLE chill_csconnectes.projet_professionnel ADD person_id INT DEFAULT NULL'); - $this->addSql('ALTER TABLE chill_csconnectes.projet_professionnel ADD CONSTRAINT FK_12E4FFBF217BBB47 FOREIGN KEY (person_id) REFERENCES chill_person_person (id) NOT DEFERRABLE INITIALLY IMMEDIATE'); - $this->addSql('CREATE INDEX IDX_12E4FFBF217BBB47 ON chill_csconnectes.projet_professionnel (person_id)'); + $this->addSql('ALTER TABLE chill_job.frein ADD person_id INT DEFAULT NULL'); + $this->addSql('ALTER TABLE chill_job.frein ADD CONSTRAINT FK_172EAC0A217BBB47 FOREIGN KEY (person_id) REFERENCES chill_person_person (id) NOT DEFERRABLE INITIALLY IMMEDIATE'); + $this->addSql('CREATE INDEX IDX_172EAC0A217BBB47 ON chill_job.frein (person_id)'); + $this->addSql('ALTER TABLE chill_job.immersion ADD person_id INT DEFAULT NULL'); + $this->addSql('ALTER TABLE chill_job.immersion ADD CONSTRAINT FK_FBB3CBB4217BBB47 FOREIGN KEY (person_id) REFERENCES chill_person_person (id) NOT DEFERRABLE INITIALLY IMMEDIATE'); + $this->addSql('CREATE INDEX IDX_FBB3CBB4217BBB47 ON chill_job.immersion (person_id)'); + $this->addSql('ALTER TABLE chill_job.projet_professionnel ADD person_id INT DEFAULT NULL'); + $this->addSql('ALTER TABLE chill_job.projet_professionnel ADD CONSTRAINT FK_12E4FFBF217BBB47 FOREIGN KEY (person_id) REFERENCES chill_person_person (id) NOT DEFERRABLE INITIALLY IMMEDIATE'); + $this->addSql('CREATE INDEX IDX_12E4FFBF217BBB47 ON chill_job.projet_professionnel (person_id)'); } public function down(Schema $schema): void { - $this->addSql('ALTER TABLE chill_csconnectes.projet_professionnel DROP CONSTRAINT FK_12E4FFBF217BBB47'); - $this->addSql('ALTER TABLE chill_csconnectes.projet_professionnel DROP person_id'); - $this->addSql('ALTER TABLE chill_csconnectes.immersion DROP CONSTRAINT FK_FBB3CBB4217BBB47'); - $this->addSql('ALTER TABLE chill_csconnectes.immersion DROP person_id'); - $this->addSql('ALTER TABLE chill_csconnectes.frein DROP CONSTRAINT FK_172EAC0A217BBB47'); - $this->addSql('ALTER TABLE chill_csconnectes.frein DROP person_id'); + $this->addSql('ALTER TABLE chill_job.projet_professionnel DROP CONSTRAINT FK_12E4FFBF217BBB47'); + $this->addSql('ALTER TABLE chill_job.projet_professionnel DROP person_id'); + $this->addSql('ALTER TABLE chill_job.immersion DROP CONSTRAINT FK_FBB3CBB4217BBB47'); + $this->addSql('ALTER TABLE chill_job.immersion DROP person_id'); + $this->addSql('ALTER TABLE chill_job.frein DROP CONSTRAINT FK_172EAC0A217BBB47'); + $this->addSql('ALTER TABLE chill_job.frein DROP person_id'); } } diff --git a/src/Bundle/ChillJobBundle/src/migrations/Version20240429111628.php b/src/Bundle/ChillJobBundle/src/migrations/Version20240429111628.php index 9ff81cce4..1a3d4d043 100644 --- a/src/Bundle/ChillJobBundle/src/migrations/Version20240429111628.php +++ b/src/Bundle/ChillJobBundle/src/migrations/Version20240429111628.php @@ -16,19 +16,19 @@ final class Version20240429111628 extends AbstractMigration public function up(Schema $schema): void { - $this->addSql('ALTER TABLE chill_csconnectes.immersion ALTER tuteurphonenumber TYPE VARCHAR(35)'); - $this->addSql('COMMENT ON COLUMN chill_csconnectes.immersion.tuteurPhoneNumber IS \'(DC2Type:phone_number)\''); + $this->addSql('ALTER TABLE chill_job.immersion ALTER tuteurphonenumber TYPE VARCHAR(35)'); + $this->addSql('COMMENT ON COLUMN chill_job.immersion.tuteurPhoneNumber IS \'(DC2Type:phone_number)\''); - $this->addSql('ALTER TABLE chill_csconnectes.immersion ALTER structureAccPhonenumber TYPE VARCHAR(35)'); - $this->addSql('COMMENT ON COLUMN chill_csconnectes.immersion.structureAccPhonenumber IS \'(DC2Type:phone_number)\''); + $this->addSql('ALTER TABLE chill_job.immersion ALTER structureAccPhonenumber TYPE VARCHAR(35)'); + $this->addSql('COMMENT ON COLUMN chill_job.immersion.structureAccPhonenumber IS \'(DC2Type:phone_number)\''); } public function down(Schema $schema): void { - $this->addSql('ALTER TABLE chill_csconnectes.immersion ALTER tuteurPhoneNumber TYPE TEXT'); - $this->addSql('COMMENT ON COLUMN chill_csconnectes.immersion.tuteurphonenumber IS NULL'); + $this->addSql('ALTER TABLE chill_job.immersion ALTER tuteurPhoneNumber TYPE TEXT'); + $this->addSql('COMMENT ON COLUMN chill_job.immersion.tuteurphonenumber IS NULL'); - $this->addSql('ALTER TABLE chill_csconnectes.immersion ALTER structureAccPhonenumber TYPE TEXT'); - $this->addSql('COMMENT ON COLUMN chill_csconnectes.immersion.structureAccPhonenumber IS NULL'); + $this->addSql('ALTER TABLE chill_job.immersion ALTER structureAccPhonenumber TYPE TEXT'); + $this->addSql('COMMENT ON COLUMN chill_job.immersion.structureAccPhonenumber IS NULL'); } } diff --git a/src/Bundle/ChillJobBundle/src/migrations/old/Version20191119172511.php b/src/Bundle/ChillJobBundle/src/migrations/old/Version20191119172511.php index cf4b17d17..6dccbec42 100644 --- a/src/Bundle/ChillJobBundle/src/migrations/old/Version20191119172511.php +++ b/src/Bundle/ChillJobBundle/src/migrations/old/Version20191119172511.php @@ -15,7 +15,7 @@ use Doctrine\DBAL\Schema\Schema; use Doctrine\Migrations\AbstractMigration; /** - * Add schema chill_csconnectes & table cs_person inside. + * Add schema chill_job & table cs_person inside. */ final class Version20191119172511 extends AbstractMigration {