<?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 Version20220410200507 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 manufacturers_car_brands (manufacturers_id INT NOT NULL, car_brands_id INT NOT NULL, INDEX IDX_186DDAFCA2A4C2E4 (manufacturers_id), INDEX IDX_186DDAFCEE0C32EB (car_brands_id), PRIMARY KEY(manufacturers_id, car_brands_id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB');
$this->addSql('ALTER TABLE manufacturers_car_brands ADD CONSTRAINT FK_186DDAFCA2A4C2E4 FOREIGN KEY (manufacturers_id) REFERENCES manufacturers (id) ON DELETE CASCADE');
$this->addSql('ALTER TABLE manufacturers_car_brands ADD CONSTRAINT FK_186DDAFCEE0C32EB FOREIGN KEY (car_brands_id) REFERENCES car_brands (id) ON DELETE CASCADE');
$this->addSql('ALTER TABLE manufacturers ADD price_increase DOUBLE PRECISION DEFAULT NULL');
}
public function down(Schema $schema): void
{
// this down() migration is auto-generated, please modify it to your needs
$this->addSql('DROP TABLE manufacturers_car_brands');
$this->addSql('ALTER TABLE manufacturers DROP price_increase');
}
}