Deprecated: Constant E_STRICT is deprecated in /var/www/PixelForce/vendor/symfony/error-handler/ErrorHandler.php on line 58

Deprecated: Constant E_STRICT is deprecated in /var/www/PixelForce/vendor/symfony/error-handler/ErrorHandler.php on line 76
Symfony Profiler

migrations/Version20240625094656.php line 1

Open in your IDE?
  1. <?php
  2. declare(strict_types=1);
  3. namespace DoctrineMigrations;
  4. use Doctrine\DBAL\Schema\Schema;
  5. use Doctrine\Migrations\AbstractMigration;
  6. /**
  7.  * Auto-generated Migration: Please modify to your needs!
  8.  */
  9. final class Version20240625094656 extends AbstractMigration
  10. {
  11.     public function getDescription(): string
  12.     {
  13.         return '';
  14.     }
  15.     public function up(Schema $schema): void
  16.     {
  17.         // this up() migration is auto-generated, please modify it to your needs
  18.         $this->addSql('CREATE TABLE config (id INT AUTO_INCREMENT NOT NULL, nom VARCHAR(255) DEFAULT NULL, val DOUBLE PRECISION DEFAULT NULL, num INT NOT NULL, statut INT NOT NULL, PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB');
  19.         $this->addSql('CREATE TABLE order_pack_product (id INT AUTO_INCREMENT NOT NULL, product_id INT NOT NULL, order_parent_id INT NOT NULL, price NUMERIC(10, 3) NOT NULL, qty INT NOT NULL, INDEX IDX_ECC300BA4584665A (product_id), INDEX IDX_ECC300BACEFDB188 (order_parent_id), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB');
  20.         $this->addSql('CREATE TABLE pack_product (id INT AUTO_INCREMENT NOT NULL, product_id INT NOT NULL, pack_id INT NOT NULL, price NUMERIC(10, 3) NOT NULL, qty INT NOT NULL, INDEX IDX_E80394D04584665A (product_id), INDEX IDX_E80394D01919B217 (pack_id), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB');
  21.         $this->addSql('ALTER TABLE order_pack_product ADD CONSTRAINT FK_ECC300BA4584665A FOREIGN KEY (product_id) REFERENCES produit (id)');
  22.         $this->addSql('ALTER TABLE order_pack_product ADD CONSTRAINT FK_ECC300BACEFDB188 FOREIGN KEY (order_parent_id) REFERENCES order_pack (id)');
  23.         $this->addSql('ALTER TABLE pack_product ADD CONSTRAINT FK_E80394D04584665A FOREIGN KEY (product_id) REFERENCES produit (id)');
  24.         $this->addSql('ALTER TABLE pack_product ADD CONSTRAINT FK_E80394D01919B217 FOREIGN KEY (pack_id) REFERENCES pack (id)');
  25.         $this->addSql('ALTER TABLE demande_devis CHANGE files files JSON DEFAULT NULL');
  26.         $this->addSql('ALTER TABLE devis CHANGE files files JSON DEFAULT NULL');
  27.         $this->addSql('ALTER TABLE order_pack ADD tva DOUBLE PRECISION DEFAULT NULL, ADD frais_livraison DOUBLE PRECISION DEFAULT NULL, ADD montant_sans_frais_livraison DOUBLE PRECISION DEFAULT NULL');
  28.         $this->addSql('ALTER TABLE order_secu CHANGE sepa sepa JSON DEFAULT NULL');
  29.         $this->addSql('ALTER TABLE pack ADD status INT DEFAULT 1, ADD document VARCHAR(255) DEFAULT NULL');
  30.         $this->addSql('ALTER TABLE user CHANGE roles roles JSON NOT NULL');
  31.         $this->addSql('CREATE UNIQUE INDEX UNIQ_8D93D649F85E0677 ON user (username)');
  32.         $this->addSql('ALTER TABLE user RENAME INDEX fk_8d93d649de2a7a37 TO IDX_8D93D649DE2A7A37');
  33.     }
  34.     public function down(Schema $schema): void
  35.     {
  36.         // this down() migration is auto-generated, please modify it to your needs
  37.         $this->addSql('ALTER TABLE order_pack_product DROP FOREIGN KEY FK_ECC300BA4584665A');
  38.         $this->addSql('ALTER TABLE order_pack_product DROP FOREIGN KEY FK_ECC300BACEFDB188');
  39.         $this->addSql('ALTER TABLE pack_product DROP FOREIGN KEY FK_E80394D04584665A');
  40.         $this->addSql('ALTER TABLE pack_product DROP FOREIGN KEY FK_E80394D01919B217');
  41.         $this->addSql('DROP TABLE config');
  42.         $this->addSql('DROP TABLE order_pack_product');
  43.         $this->addSql('DROP TABLE pack_product');
  44.         $this->addSql('ALTER TABLE demande_devis CHANGE files files JSON DEFAULT NULL');
  45.         $this->addSql('ALTER TABLE devis CHANGE files files JSON DEFAULT NULL');
  46.         $this->addSql('ALTER TABLE order_pack DROP tva, DROP frais_livraison, DROP montant_sans_frais_livraison');
  47.         $this->addSql('ALTER TABLE order_secu CHANGE sepa sepa JSON DEFAULT NULL');
  48.         $this->addSql('ALTER TABLE pack DROP status, DROP document');
  49.         $this->addSql('DROP INDEX UNIQ_8D93D649F85E0677 ON `user`');
  50.         $this->addSql('ALTER TABLE `user` CHANGE roles roles JSON NOT NULL');
  51.         $this->addSql('ALTER TABLE `user` RENAME INDEX idx_8d93d649de2a7a37 TO FK_8D93D649DE2A7A37');
  52.     }
  53. }