<?php
declare(strict_types=1);
namespace DoctrineMigrations;
use Doctrine\DBAL\Schema\Schema;
use Doctrine\Migrations\AbstractMigration;
/**
* Auto-generated Migration: Please modify to your needs!
*/
final class Version20220729182106 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('CREATE TABLE visiting_card2_address (id INT AUTO_INCREMENT NOT NULL, address_id INT DEFAULT NULL, visiting_card_id INT DEFAULT NULL, position DOUBLE PRECISION DEFAULT NULL, INDEX IDX_3EC45DDAF5B7AF75 (address_id), INDEX IDX_3EC45DDAEB37EBA0 (visiting_card_id), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB');
$this->addSql('ALTER TABLE visiting_card2_address ADD CONSTRAINT FK_3EC45DDAF5B7AF75 FOREIGN KEY (address_id) REFERENCES address (id)');
$this->addSql('ALTER TABLE visiting_card2_address ADD CONSTRAINT FK_3EC45DDAEB37EBA0 FOREIGN KEY (visiting_card_id) REFERENCES visiting_card (id)');
}
public function down(Schema $schema): void
{
// this down() migration is auto-generated, please modify it to your needs
$this->addSql('DROP TABLE visiting_card2_address');
}
}