mirror of
https://forge.chapril.org/tykayn/caisse-bliss
synced 2025-06-20 01:44:42 +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');
|
||||
}
|
||||
}
|
47
migrations/Version20250214102313.php
Normal file
47
migrations/Version20250214102313.php
Normal file
|
@ -0,0 +1,47 @@
|
|||
<?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 Version20250214102313 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 serie_festival (id INT AUTO_INCREMENT NOT NULL, user_id INT DEFAULT NULL, name VARCHAR(255) NOT NULL, date_creation DATE NOT NULL, INDEX IDX_4DFA58B1A76ED395 (user_id), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB');
|
||||
$this->addSql('ALTER TABLE serie_festival ADD CONSTRAINT FK_4DFA58B1A76ED395 FOREIGN KEY (user_id) REFERENCES user (id)');
|
||||
$this->addSql('ALTER TABLE festival ADD serie_festival_id INT DEFAULT NULL, 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 festival ADD CONSTRAINT FK_57CF7898DD79D04 FOREIGN KEY (serie_festival_id) REFERENCES serie_festival (id)');
|
||||
$this->addSql('CREATE INDEX IDX_57CF7898DD79D04 ON festival (serie_festival_id)');
|
||||
$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 FOREIGN KEY FK_57CF7898DD79D04');
|
||||
$this->addSql('ALTER TABLE serie_festival DROP FOREIGN KEY FK_4DFA58B1A76ED395');
|
||||
$this->addSql('DROP TABLE serie_festival');
|
||||
$this->addSql('DROP INDEX IDX_57CF7898DD79D04 ON festival');
|
||||
$this->addSql('ALTER TABLE festival DROP serie_festival_id, 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');
|
||||
}
|
||||
}
|
31
migrations/Version20250214103429.php
Normal file
31
migrations/Version20250214103429.php
Normal file
|
@ -0,0 +1,31 @@
|
|||
<?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 Version20250214103429 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 user ADD last_login DATE DEFAULT NULL');
|
||||
}
|
||||
|
||||
public function down(Schema $schema): void
|
||||
{
|
||||
// this down() migration is auto-generated, please modify it to your needs
|
||||
$this->addSql('ALTER TABLE user DROP last_login');
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue