mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-06-07 18:44:08 +00:00
allow null values on phonenumber in location and person
This commit is contained in:
parent
6a3c8017f0
commit
09de7cbf7d
@ -91,14 +91,14 @@ class Location implements TrackCreationInterface, TrackUpdateInterface
|
||||
private ?string $name = null;
|
||||
|
||||
/**
|
||||
* @ORM\Column(type="phone_number")
|
||||
* @ORM\Column(type="phone_number", nullable=true)
|
||||
* @Serializer\Groups({"read", "write", "docgen:read"})
|
||||
* @PhonenumberConstraint(type="any")
|
||||
*/
|
||||
private ?PhoneNumber $phonenumber1 = null;
|
||||
|
||||
/**
|
||||
* @ORM\Column(type="phone_number")
|
||||
* @ORM\Column(type="phone_number", nullable=true)
|
||||
* @Serializer\Groups({"read", "write", "docgen:read"})
|
||||
* @PhonenumberConstraint(type="any")
|
||||
*/
|
||||
|
@ -30,11 +30,9 @@ final class Version20220302132728 extends AbstractMigration implements Container
|
||||
|
||||
$this->addSql('ALTER TABLE chill_main_location ALTER phonenumber1 TYPE VARCHAR(35)');
|
||||
$this->addSql('ALTER TABLE chill_main_location ALTER phonenumber1 DROP DEFAULT');
|
||||
$this->addSql('ALTER TABLE chill_main_location ALTER phonenumber1 SET NOT NULL');
|
||||
$this->addSql('ALTER TABLE chill_main_location ALTER phonenumber1 TYPE VARCHAR(35)');
|
||||
$this->addSql('ALTER TABLE chill_main_location ALTER phonenumber2 TYPE VARCHAR(35)');
|
||||
$this->addSql('ALTER TABLE chill_main_location ALTER phonenumber2 DROP DEFAULT');
|
||||
$this->addSql('ALTER TABLE chill_main_location ALTER phonenumber2 SET NOT NULL');
|
||||
$this->addSql('ALTER TABLE chill_main_location ALTER phonenumber2 TYPE VARCHAR(35)');
|
||||
$this->addSql('COMMENT ON COLUMN chill_main_location.phonenumber1 IS \'(DC2Type:phone_number)\'');
|
||||
$this->addSql('COMMENT ON COLUMN chill_main_location.phonenumber2 IS \'(DC2Type:phone_number)\'');
|
||||
@ -51,10 +49,8 @@ final class Version20220302132728 extends AbstractMigration implements Container
|
||||
{
|
||||
$this->addSql('ALTER TABLE chill_main_location ALTER phonenumber1 TYPE VARCHAR(64)');
|
||||
$this->addSql('ALTER TABLE chill_main_location ALTER phonenumber1 DROP DEFAULT');
|
||||
$this->addSql('ALTER TABLE chill_main_location ALTER phonenumber1 DROP NOT NULL');
|
||||
$this->addSql('ALTER TABLE chill_main_location ALTER phonenumber2 TYPE VARCHAR(64)');
|
||||
$this->addSql('ALTER TABLE chill_main_location ALTER phonenumber2 DROP DEFAULT');
|
||||
$this->addSql('ALTER TABLE chill_main_location ALTER phonenumber2 DROP NOT NULL');
|
||||
$this->addSql('COMMENT ON COLUMN chill_main_location.phonenumber1 IS NULL');
|
||||
$this->addSql('COMMENT ON COLUMN chill_main_location.phonenumber2 IS NULL');
|
||||
}
|
||||
|
@ -373,7 +373,7 @@ class Person implements HasCenterInterface, TrackCreationInterface, TrackUpdateI
|
||||
* The person's mobile phone number.
|
||||
*
|
||||
* @PhonenumberConstraint(type="mobile")
|
||||
* @ORM\Column(type="phone_number")
|
||||
* @ORM\Column(type="phone_number", nullable=true)
|
||||
*/
|
||||
private ?PhoneNumber $mobilenumber = null;
|
||||
|
||||
@ -425,7 +425,7 @@ class Person implements HasCenterInterface, TrackCreationInterface, TrackUpdateI
|
||||
/**
|
||||
* The person's phonenumber.
|
||||
*
|
||||
* @ORM\Column(type="phone_number")
|
||||
* @ORM\Column(type="phone_number", nullable=true)
|
||||
* @PhonenumberConstraint(
|
||||
* type="landline",
|
||||
* )
|
||||
|
Loading…
x
Reference in New Issue
Block a user