migrations/Version20260122122005.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 Version20260122122005 extends AbstractMigration
  10. {
  11.     public function getDescription(): string
  12.     {
  13.         return 'Creación de tabla descubrir_destacado';
  14.     }
  15.     public function up(Schema $schema): void
  16.     {
  17.         $this->addSql('CREATE TABLE descubrir_destacado (
  18.             id INT AUTO_INCREMENT NOT NULL,
  19.             titulo VARCHAR(255) NOT NULL,
  20.             descripcion TEXT DEFAULT NULL,
  21.             url VARCHAR(255) DEFAULT NULL,
  22.             color VARCHAR(255) DEFAULT NULL,
  23.             activo TINYINT(1) NOT NULL,
  24.             posicion INT DEFAULT NULL,
  25.             imagen VARCHAR(255) NOT NULL,
  26.             created_at DATETIME NOT NULL,
  27.             updated_at DATETIME NOT NULL,
  28.             INDEX IDX_TITULO (titulo),
  29.             PRIMARY KEY(id)
  30.         ) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB');
  31.     }
  32.     public function down(Schema $schema): void
  33.     {
  34.         $this->addSql('DROP TABLE descubrir_destacado');
  35.     }
  36. }