mirror of
https://forge.chapril.org/tykayn/caisse-bliss
synced 2025-10-09 17:02:47 +02:00
up schema
This commit is contained in:
parent
17e7fce7f8
commit
8e2da4f159
20 changed files with 879 additions and 4 deletions
39
migrations/Version20250214102008.php
Normal file
39
migrations/Version20250214102008.php
Normal file
|
@ -0,0 +1,39 @@
|
|||
<?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');
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue