migrations/Version20250825093400.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 Version20250825093400 extends AbstractMigration
  10. {
  11.     public function getDescription(): string
  12.     {
  13.         return '';
  14.     }
  15.     public function up(Schema $schema): void
  16.     {
  17.        $this->addSql('ALTER TABLE delivery_rating ADD article_comment VARCHAR(255) DEFAULT NULL, ADD grooming_of_deliveryMan INT NOT NULL, ADD attidude_of_deliveryMan INT NOT NULL, ADD respect_of_geolocation INT NOT NULL, ADD speed_rating INT NOT NULL, ADD articles_rating VARCHAR(255) NOT NULL, CHANGE rating rating DOUBLE PRECISION NOT NULL');
  18.        $this->addSql('ALTER TABLE livreur ADD rating DECIMAL(2,1) DEFAULT NULL, ADD profile VARCHAR(255) DEFAULT NULL');
  19.        $this->addSql('ALTER TABLE food ADD rating FLOAT DEFAULT NULL');
  20.     }
  21.     public function down(Schema $schema): void
  22.     {
  23.         $this->addSql('ALTER TABLE delivery_rating DROP article_comment, DROP grooming_of_deliveryMan, DROP attidude_of_deliveryMan, DROP respect_of_geolocation, DROP speed_rating, DROP articles_rating, CHANGE rating rating INT NOT NULL');
  24.         $this->addSql('ALTER TABLE livreur DROP rating, DROP profile');
  25.         $this->addSql('ALTER TABLE food DROP rating');
  26.     }
  27. }