Doctrine migration fix
This commit is contained in:
parent
ff856ee6d3
commit
972fa57771
|
|
@ -10,7 +10,7 @@ use Doctrine\Migrations\AbstractMigration;
|
||||||
/**
|
/**
|
||||||
* Auto-generated Migration: Please modify to your needs!
|
* Auto-generated Migration: Please modify to your needs!
|
||||||
*/
|
*/
|
||||||
final class Version20260116104840 extends AbstractMigration
|
final class Version20260116134351 extends AbstractMigration
|
||||||
{
|
{
|
||||||
public function getDescription(): string
|
public function getDescription(): string
|
||||||
{
|
{
|
||||||
|
|
@ -20,6 +20,7 @@ final class Version20260116104840 extends AbstractMigration
|
||||||
public function up(Schema $schema): void
|
public function up(Schema $schema): void
|
||||||
{
|
{
|
||||||
// this up() migration is auto-generated, please modify it to your needs
|
// this up() migration is auto-generated, please modify it to your needs
|
||||||
|
$this->addSql('ALTER TABLE contacts ADD due_quartal INT DEFAULT NULL');
|
||||||
$this->addSql('CREATE UNIQUE INDEX unique_quartal ON contacts (phone_number, due_quartal) WHERE due_quartal IS NOT NULL');
|
$this->addSql('CREATE UNIQUE INDEX unique_quartal ON contacts (phone_number, due_quartal) WHERE due_quartal IS NOT NULL');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -28,5 +29,6 @@ final class Version20260116104840 extends AbstractMigration
|
||||||
// this down() migration is auto-generated, please modify it to your needs
|
// this down() migration is auto-generated, please modify it to your needs
|
||||||
$this->addSql('CREATE SCHEMA public');
|
$this->addSql('CREATE SCHEMA public');
|
||||||
$this->addSql('DROP INDEX unique_quartal');
|
$this->addSql('DROP INDEX unique_quartal');
|
||||||
|
$this->addSql('ALTER TABLE contacts DROP due_quartal');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Loading…
Reference in New Issue
Block a user