<?php
declare(strict_types=1);
namespace DoctrineMigrations;
use Doctrine\DBAL\Schema\Schema;
use Doctrine\Migrations\AbstractMigration;
/**
* Auto-generated Migration: Please modify to your needs!
*/
final class Version20260122122005 extends AbstractMigration
{
public function getDescription(): string
{
return 'Creación de tabla descubrir_destacado';
}
public function up(Schema $schema): void
{
$this->addSql('CREATE TABLE descubrir_destacado (
id INT AUTO_INCREMENT NOT NULL,
titulo VARCHAR(255) NOT NULL,
descripcion TEXT DEFAULT NULL,
url VARCHAR(255) DEFAULT NULL,
color VARCHAR(255) DEFAULT NULL,
activo TINYINT(1) NOT NULL,
posicion INT DEFAULT NULL,
imagen VARCHAR(255) NOT NULL,
created_at DATETIME NOT NULL,
updated_at DATETIME NOT NULL,
INDEX IDX_TITULO (titulo),
PRIMARY KEY(id)
) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB');
}
public function down(Schema $schema): void
{
$this->addSql('DROP TABLE descubrir_destacado');
}
}