<?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 Version20230406115226 extends AbstractMigration
{
public function getDescription(): string
{
return '';
}
public function up(Schema $schema): void
{
//
// this up() migration is auto-generated, please modify it to your needs
$this->addSql('ALTER TABLE menu ADD from_date DATETIME DEFAULT NULL,
ADD due_date DATETIME DEFAULT NULL');
$this->addSql('ALTER TABLE restaurante ADD locality VARCHAR(255) NOT NULL DEFAULT "Collado Villalba",
ADD postalCode VARCHAR(255) NOT NULL DEFAULT "28400",
CHANGE direccion direccion VARCHAR(255) NOT NULL,
CHANGE lat lat VARCHAR(255) NOT NULL,
CHANGE lng lng VARCHAR(255) NOT NULL,
CHANGE telefono telefono INT NOT NULL,
CHANGE created created DATETIME NOT NULL,
CHANGE updated updated DATETIME NOT NULL');
}
public function down(Schema $schema): void
{
// this down() migration is auto-generated, please modify it to your needs
$this->addSql('ALTER TABLE menu DROP from_date, DROP due_date');
$this->addSql('ALTER TABLE restaurante DROP locality, DROP postalCode, CHANGE direccion direccion VARCHAR(255) DEFAULT NULL, CHANGE lat lat VARCHAR(255) DEFAULT NULL, CHANGE lng lng VARCHAR(255) DEFAULT NULL, CHANGE telefono telefono INT DEFAULT NULL, CHANGE created created DATETIME DEFAULT NULL, CHANGE updated updated DATETIME DEFAULT NULL');
}
}