mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-07-02 23:16:13 +00:00
postal code: rename fields to avoid confusion in load fixtures
This commit is contained in:
parent
fd73fac1a8
commit
748fe28f8d
@ -193,7 +193,7 @@ class LoadPostalCodesCommand extends Command
|
||||
;
|
||||
|
||||
if (NULL != $row[3]){
|
||||
$postalCode->setRefId($row[3]);
|
||||
$postalCode->setRefPostalCodeId($row[3]);
|
||||
}
|
||||
|
||||
if (NULL != $row[4] & NULL != $row[5]){
|
||||
@ -201,7 +201,7 @@ class LoadPostalCodesCommand extends Command
|
||||
}
|
||||
|
||||
if (NULL != $row[6]){
|
||||
$postalCode->setSource($row[6]);
|
||||
$postalCode->setPostalCodeSource($row[6]);
|
||||
}
|
||||
|
||||
$errors = $this->validator->validate($postalCode);
|
||||
|
@ -69,7 +69,7 @@ class PostalCode
|
||||
* @ORM\Column(type="string", length=255, nullable=true)
|
||||
* @groups({"write", "read"})
|
||||
*/
|
||||
private $refId;
|
||||
private $refPostalCodeId;
|
||||
|
||||
/**
|
||||
* @var string
|
||||
@ -77,7 +77,7 @@ class PostalCode
|
||||
* @ORM\Column(type="string", length=255, nullable=true)
|
||||
* @groups({"write", "read"})
|
||||
*/
|
||||
private $source;
|
||||
private $postalCodeSource;
|
||||
|
||||
/**
|
||||
* @var Point
|
||||
@ -195,26 +195,26 @@ class PostalCode
|
||||
return $this->country;
|
||||
}
|
||||
|
||||
public function getRefId(): ?string
|
||||
public function getRefPostalCodeId(): ?string
|
||||
{
|
||||
return $this->refId;
|
||||
return $this->refPostalCodeId;
|
||||
}
|
||||
|
||||
public function setRefId(?string $refId): self
|
||||
public function setRefPostalCodeId(?string $refPostalCodeId): self
|
||||
{
|
||||
$this->refId = $refId;
|
||||
$this->refPostalCodeId = $refPostalCodeId;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function getSource(): ?string
|
||||
public function getPostalCodeSource(): ?string
|
||||
{
|
||||
return $this->source;
|
||||
return $this->postalCodeSource;
|
||||
}
|
||||
|
||||
public function setSource(?string $source): self
|
||||
public function setPostalCodeSource(?string $postalCodeSource): self
|
||||
{
|
||||
$this->source = $source;
|
||||
$this->postalCodeSource = $postalCodeSource;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
@ -20,14 +20,14 @@ final class Version20211006151653 extends AbstractMigration
|
||||
public function up(Schema $schema): void
|
||||
{
|
||||
$this->addSql('ALTER TABLE chill_main_postal_code ADD refPostalCodeId VARCHAR(255) DEFAULT NULL');
|
||||
$this->addSql('ALTER TABLE chill_main_postal_code ADD source VARCHAR(255) DEFAULT NULL');
|
||||
$this->addSql('ALTER TABLE chill_main_postal_code ADD postalCodeSource VARCHAR(255) DEFAULT NULL');
|
||||
$this->addSql('ALTER TABLE chill_main_postal_code ADD center geometry(POINT,4326) DEFAULT NULL');
|
||||
}
|
||||
|
||||
public function down(Schema $schema): void
|
||||
{
|
||||
$this->addSql('ALTER TABLE chill_main_postal_code DROP refPostalCodeId');
|
||||
$this->addSql('ALTER TABLE chill_main_postal_code DROP source');
|
||||
$this->addSql('ALTER TABLE chill_main_postal_code DROP postalCodeSource');
|
||||
$this->addSql('ALTER TABLE chill_main_postal_code DROP center');
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user