<?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 Version20240709133313 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 budget_invoice (id INT AUTO_INCREMENT NOT NULL, doc_id INT DEFAULT NULL, owner_id INT NOT NULL, creation_date DATETIME NOT NULL, name VARCHAR(255) NOT NULL, info LONGTEXT DEFAULT NULL, value NUMERIC(7, 2) NOT NULL, delivery NUMERIC(7, 2) DEFAULT NULL, store VARCHAR(255) DEFAULT NULL, UNIQUE INDEX UNIQ_52E65DA5895648BC (doc_id), INDEX IDX_52E65DA57E3C61F9 (owner_id), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB');
$this->addSql('ALTER TABLE budget_invoice ADD CONSTRAINT FK_52E65DA5895648BC FOREIGN KEY (doc_id) REFERENCES document (id)');
$this->addSql('ALTER TABLE budget_invoice ADD CONSTRAINT FK_52E65DA57E3C61F9 FOREIGN KEY (owner_id) REFERENCES access (id)');
}
public function down(Schema $schema): void
{
// this down() migration is auto-generated, please modify it to your needs
$this->addSql('DROP TABLE budget_invoice');
}
}