migrations/Delete/Version20250423140452_ReportingOps.php line 1

  1. <?php
  2. declare(strict_types=1);
  3. namespace DoctrineMigrations\Delete;
  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 Version20250423140452_ReportingOps extends AbstractMigration
  10. {
  11.     public function getDescription(): string
  12.     {
  13.         return 'Add ops reporting table';
  14.     }
  15.     public function up(Schema $schema): void
  16.     {
  17.         $this->addSql('CREATE TABLE reporting_ops (
  18.             id                  SERIAL PRIMARY KEY,
  19.             data                JSONB                       NOT NULL,
  20.             created_at          TIMESTAMP(0) WITH TIME ZONE NOT NULL DEFAULT CURRENT_TIMESTAMP
  21.         )');
  22.         $this->addSql("COMMENT ON COLUMN reporting_ops.data IS '(DC2Type:json_document)'");
  23.     }
  24.     public function down(Schema $schema): void
  25.     {
  26.         $this->addSql('DROP TABLE IF EXISTS reporting_ops');
  27.     }
  28. }