<?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 Version20230515062916 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 purchase ADD service_package_id INT NOT NULL');
$this->addSql('ALTER TABLE purchase ADD CONSTRAINT FK_6117D13B621D924B FOREIGN KEY (service_package_id) REFERENCES service_package (id)');
$this->addSql('CREATE INDEX IDX_6117D13B621D924B ON purchase (service_package_id)');
}
public function down(Schema $schema): void
{
// this down() migration is auto-generated, please modify it to your needs
$this->addSql('ALTER TABLE purchase DROP FOREIGN KEY FK_6117D13B621D924B');
$this->addSql('DROP INDEX IDX_6117D13B621D924B ON purchase');
$this->addSql('ALTER TABLE purchase DROP service_package_id');
}
}