migrations/Version20260227000000.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. final class Version20260227000000 extends AbstractMigration
  7. {
  8.     public function getDescription(): string
  9.     {
  10.         return 'Create table google_review_stats';
  11.     }
  12.     public function up(Schema $schema): void
  13.     {
  14.         $this->addSql('
  15.             CREATE TABLE google_review_stats (
  16.                 id INT AUTO_INCREMENT NOT NULL,
  17.                 rating DOUBLE PRECISION NOT NULL,
  18.                 review_count INT NOT NULL,
  19.                 updated_at DATETIME NOT NULL COMMENT \'(DC2Type:datetime_immutable)\',
  20.                 PRIMARY KEY(id)
  21.             ) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB
  22.         ');
  23.     }
  24.     public function down(Schema $schema): void
  25.     {
  26.         $this->addSql('DROP TABLE google_review_stats');
  27.     }
  28. }