40 lines
1.7 KiB
PHP
40 lines
1.7 KiB
PHP
<?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 Version20250214102008 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 festival ADD frais_inscription DOUBLE PRECISION DEFAULT NULL, ADD fond_de_caisse_avant DOUBLE PRECISION DEFAULT NULL, ADD fond_de_caisse_apres DOUBLE PRECISION DEFAULT NULL, ADD date_creation DATE NOT NULL');
|
|
$this->addSql('ALTER TABLE product ADD image VARCHAR(255) NOT NULL, ADD comment VARCHAR(500) DEFAULT NULL');
|
|
$this->addSql('ALTER TABLE selling ADD festival_id INT DEFAULT NULL');
|
|
$this->addSql('ALTER TABLE selling ADD CONSTRAINT FK_5A491BAB8AEBAF57 FOREIGN KEY (festival_id) REFERENCES festival (id)');
|
|
$this->addSql('CREATE INDEX IDX_5A491BAB8AEBAF57 ON selling (festival_id)');
|
|
}
|
|
|
|
public function down(Schema $schema): void
|
|
{
|
|
// this down() migration is auto-generated, please modify it to your needs
|
|
$this->addSql('ALTER TABLE festival DROP frais_inscription, DROP fond_de_caisse_avant, DROP fond_de_caisse_apres, DROP date_creation');
|
|
$this->addSql('ALTER TABLE selling DROP FOREIGN KEY FK_5A491BAB8AEBAF57');
|
|
$this->addSql('DROP INDEX IDX_5A491BAB8AEBAF57 ON selling');
|
|
$this->addSql('ALTER TABLE selling DROP festival_id');
|
|
$this->addSql('ALTER TABLE product DROP image, DROP comment');
|
|
}
|
|
}
|