migrations/Version20231201215027.php line 1
<?phpdeclare(strict_types=1);namespace DoctrineMigrations;use Doctrine\DBAL\Schema\Schema;use Doctrine\Migrations\AbstractMigration;/*** Auto-generated Migration: Please modify to your needs!*/final class Version20231201215027 extends AbstractMigration{public function getDescription(): string{return '';}public function up(Schema $schema): void{// this up() migration is auto-generated, please modify it to your needs$this->addSql('ALTER TABLE residence ADD country_id INT DEFAULT NULL, ADD province_id INT DEFAULT NULL');$this->addSql('ALTER TABLE residence ADD CONSTRAINT FK_3275823F92F3E70 FOREIGN KEY (country_id) REFERENCES country (id)');$this->addSql('ALTER TABLE residence ADD CONSTRAINT FK_3275823E946114A FOREIGN KEY (province_id) REFERENCES province (id)');$this->addSql('CREATE INDEX IDX_3275823F92F3E70 ON residence (country_id)');$this->addSql('CREATE INDEX IDX_3275823E946114A ON residence (province_id)');}public function down(Schema $schema): void{// this down() migration is auto-generated, please modify it to your needs$this->addSql('ALTER TABLE residence DROP FOREIGN KEY FK_3275823F92F3E70');$this->addSql('ALTER TABLE residence DROP FOREIGN KEY FK_3275823E946114A');$this->addSql('DROP INDEX IDX_3275823F92F3E70 ON residence');$this->addSql('DROP INDEX IDX_3275823E946114A ON residence');$this->addSql('ALTER TABLE residence DROP country_id, DROP province_id');}}