<?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 Version20220916161437 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 reisekosten DROP FOREIGN KEY FK_10355462A40A2C8');
$this->addSql('DROP TABLE reisekosten');
$this->addSql('ALTER TABLE calendar ADD itinerary VARCHAR(255) DEFAULT NULL, ADD km DOUBLE PRECISION DEFAULT NULL');
}
public function down(Schema $schema): void
{
// this down() migration is auto-generated, please modify it to your needs
$this->addSql('CREATE TABLE reisekosten (id INT AUTO_INCREMENT NOT NULL, calendar_id INT DEFAULT NULL, itinerary VARCHAR(255) CHARACTER SET utf8mb4 DEFAULT NULL COLLATE `utf8mb4_unicode_ci`, purpose LONGTEXT CHARACTER SET utf8mb4 DEFAULT NULL COLLATE `utf8mb4_unicode_ci`, km DOUBLE PRECISION DEFAULT NULL, UNIQUE INDEX UNIQ_10355462A40A2C8 (calendar_id), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB COMMENT = \'\' ');
$this->addSql('ALTER TABLE reisekosten ADD CONSTRAINT FK_10355462A40A2C8 FOREIGN KEY (calendar_id) REFERENCES calendar (id)');
$this->addSql('ALTER TABLE calendar DROP itinerary, DROP km');
}
}