migrations/Version20260107090352.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 Version20260107090352 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 crm_alert (id INT AUTO_INCREMENT NOT NULL, resolved_by_id INT DEFAULT NULL, type VARCHAR(100) NOT NULL, resource_type VARCHAR(50) NOT NULL, resource_id INT NOT NULL, severity VARCHAR(20) NOT NULL, status VARCHAR(20) NOT NULL, message VARCHAR(255) NOT NULL, metadata LONGTEXT DEFAULT NULL COMMENT \'(DC2Type:json)\', created_at DATETIME NOT NULL COMMENT \'(DC2Type:datetime_immutable)\', resolved_at DATETIME DEFAULT NULL COMMENT \'(DC2Type:datetime_immutable)\', INDEX IDX_ABF419F96713A32B (resolved_by_id), INDEX idx_crm_alert_status (status), INDEX idx_crm_alert_resource (resource_type, resource_id), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB');
  19.         $this->addSql('ALTER TABLE crm_alert ADD CONSTRAINT FK_ABF419F96713A32B FOREIGN KEY (resolved_by_id) REFERENCES app_user (id) ON DELETE SET NULL');
  20.         $this->addSql('ALTER TABLE app_payment_history ADD INDEX `idx_app_payment_history_installment_user` (`is_installment`);');
  21.     }
  22.     public function down(Schema $schema): void
  23.     {
  24.         // this down() migration is auto-generated, please modify it to your needs
  25.     }
  26. }