diff --git a/src/Bundle/ChillMainBundle/migrations/Version20220217133607.php b/src/Bundle/ChillMainBundle/migrations/Version20220217133607.php new file mode 100644 index 000000000..b2be09645 --- /dev/null +++ b/src/Bundle/ChillMainBundle/migrations/Version20220217133607.php @@ -0,0 +1,38 @@ +addSql('ALTER TABLE IF EXISTS chill_main_residential_address RENAME TO chill_person_residential_address;'); + $this->addSql('ALTER SEQUENCE IF EXISTS chill_main_residential_address_id_seq RENAME TO chill_person_residential_address_id_seq;'); + } + + public function down(Schema $schema): void + { + $this->addSql('ALTER TABLE IF EXISTS chill_person_residential_address RENAME TO chill_main_residential_address;'); + $this->addSql('ALTER SEQUENCE IF EXISTS chill_person_residential_address_id_seq RENAME TO chill_main_residential_address_id_seq;'); + } +} diff --git a/src/Bundle/ChillPersonBundle/Controller/ResidentialAddressController.php b/src/Bundle/ChillPersonBundle/Controller/ResidentialAddressController.php index 8b266208a..a2330bf88 100644 --- a/src/Bundle/ChillPersonBundle/Controller/ResidentialAddressController.php +++ b/src/Bundle/ChillPersonBundle/Controller/ResidentialAddressController.php @@ -11,9 +11,9 @@ declare(strict_types=1); namespace Chill\PersonBundle\Controller; -use Chill\MainBundle\Entity\ResidentialAddress; -use Chill\MainBundle\Form\Type\ResidentialAddressType; -use Chill\MainBundle\Repository\ResidentialAddressRepository; +use Chill\PersonBundle\Entity\Person\ResidentialAddress; +use Chill\PersonBundle\Form\Type\ResidentialAddressType; +use Chill\PersonBundle\Repository\ResidentialAddressRepository; use Chill\PersonBundle\Entity\Person; use Chill\PersonBundle\Security\Authorization\PersonVoter; use Symfony\Bundle\FrameworkBundle\Controller\AbstractController; diff --git a/src/Bundle/ChillMainBundle/Entity/ResidentialAddress.php b/src/Bundle/ChillPersonBundle/Entity/Person/ResidentialAddress.php similarity index 94% rename from src/Bundle/ChillMainBundle/Entity/ResidentialAddress.php rename to src/Bundle/ChillPersonBundle/Entity/Person/ResidentialAddress.php index 7763ea9d5..b2f10ac08 100644 --- a/src/Bundle/ChillMainBundle/Entity/ResidentialAddress.php +++ b/src/Bundle/ChillPersonBundle/Entity/Person/ResidentialAddress.php @@ -9,10 +9,11 @@ declare(strict_types=1); -namespace Chill\MainBundle\Entity; +namespace Chill\PersonBundle\Entity\Person; +use Chill\MainBundle\Entity\Address; use Chill\MainBundle\Entity\Embeddable\CommentEmbeddable; -use Chill\MainBundle\Repository\ResidentialAddressRepository; +use Chill\PersonBundle\Repository\ResidentialAddressRepository; use Chill\PersonBundle\Entity\Person; use Chill\ThirdPartyBundle\Entity\ThirdParty; use DateTimeImmutable; @@ -20,7 +21,7 @@ use Doctrine\ORM\Mapping as ORM; /** * @ORM\Entity(repositoryClass=ResidentialAddressRepository::class) - * @ORM\Table(name="chill_main_residential_address") + * @ORM\Table(name="chill_person_residential_address") */ class ResidentialAddress { diff --git a/src/Bundle/ChillMainBundle/Form/Type/ResidentialAddressType.php b/src/Bundle/ChillPersonBundle/Form/ResidentialAddressType.php similarity index 91% rename from src/Bundle/ChillMainBundle/Form/Type/ResidentialAddressType.php rename to src/Bundle/ChillPersonBundle/Form/ResidentialAddressType.php index 0ebe47fef..e7577f336 100644 --- a/src/Bundle/ChillMainBundle/Form/Type/ResidentialAddressType.php +++ b/src/Bundle/ChillPersonBundle/Form/ResidentialAddressType.php @@ -9,9 +9,11 @@ declare(strict_types=1); -namespace Chill\MainBundle\Form\Type; +namespace Chill\PersonBundle\Form\Type; -use Chill\MainBundle\Entity\ResidentialAddress; +use Chill\MainBundle\Form\Type\CommentType; +use Chill\MainBundle\Form\Type\PickAddressType; +use Chill\PersonBundle\Entity\Person\ResidentialAddress; use Chill\PersonBundle\Form\Type\PickPersonDynamicType; use Chill\ThirdPartyBundle\Form\Type\PickThirdpartyDynamicType; use Symfony\Component\Form\AbstractType; diff --git a/src/Bundle/ChillMainBundle/Repository/ResidentialAddressRepository.php b/src/Bundle/ChillPersonBundle/Repository/ResidentialAddressRepository.php similarity index 94% rename from src/Bundle/ChillMainBundle/Repository/ResidentialAddressRepository.php rename to src/Bundle/ChillPersonBundle/Repository/ResidentialAddressRepository.php index 05cdfdf6c..fedbe8824 100644 --- a/src/Bundle/ChillMainBundle/Repository/ResidentialAddressRepository.php +++ b/src/Bundle/ChillPersonBundle/Repository/ResidentialAddressRepository.php @@ -9,9 +9,9 @@ declare(strict_types=1); -namespace Chill\MainBundle\Repository; +namespace Chill\PersonBundle\Repository; -use Chill\MainBundle\Entity\ResidentialAddress; +use Chill\PersonBundle\Entity\Person\ResidentialAddress; use Doctrine\Bundle\DoctrineBundle\Repository\ServiceEntityRepository; use Doctrine\Persistence\ManagerRegistry;