<?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 Version20231207120745 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 invoice_automation_item (id INT AUTO_INCREMENT NOT NULL, invoice_id INT NOT NULL, subject VARCHAR(255) NOT NULL, amount DOUBLE PRECISION NOT NULL, INDEX IDX_2A2767E42989F1FD (invoice_id), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8 COLLATE `utf8_unicode_ci` ENGINE = InnoDB');
$this->addSql('ALTER TABLE invoice_automation_item ADD CONSTRAINT FK_2A2767E42989F1FD FOREIGN KEY (invoice_id) REFERENCES invoice_automation (id)');
}
public function down(Schema $schema): void
{
// this down() migration is auto-generated, please modify it to your needs
$this->addSql('ALTER TABLE invoice_automation_item DROP FOREIGN KEY FK_2A2767E42989F1FD');
$this->addSql('DROP TABLE invoice_automation_item');
}
}