<?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 Version20251111154739 extends AbstractMigration
{
public function getDescription(): string
{
return 'Crea la tabla clima con campos id, nombre e icono';
}
public function up(Schema $schema): void
{
$this->addSql('CREATE TABLE clima (
id INT AUTO_INCREMENT NOT NULL,
nombre VARCHAR(255) NOT NULL,
icono VARCHAR(255) DEFAULT NULL,
activo TINYINT(1) DEFAULT 1 NOT NULL,
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
{
$this->addSql('DROP TABLE clima');
}
}