<?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 Version20251104142618 extends AbstractMigration
{
public function getDescription(): string
{
return 'Crea la tabla bax para gestionar banner, icono, título, imagen de título y estado activo';
}
public function up(Schema $schema): void
{
// Crear tabla bax
$this->addSql('CREATE TABLE bax (
id INT AUTO_INCREMENT NOT NULL,
titulo VARCHAR(255) NOT NULL,
banner VARCHAR(255) DEFAULT NULL,
icono VARCHAR(255) DEFAULT NULL,
imagen_titulo VARCHAR(255) DEFAULT NULL,
activo TINYINT(1) NOT NULL DEFAULT 1,
created_at DATETIME NOT NULL,
updated_at DATETIME NOT NULL,
deleted_at DATETIME DEFAULT NULL,
PRIMARY KEY(id)
) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB');
}
public function down(Schema $schema): void
{
// Eliminar tabla bax
$this->addSql('DROP TABLE bax');
}
}