<?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 Version20240105171611 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('UPDATE ws_event SET zoom_meeting = NULL WHERE zoom_meeting = \'N;\'');
$this->addSql('UPDATE ws_event SET zoom_meeting = REPLACE(SUBSTRING_INDEX(SUBSTRING_INDEX(SUBSTRING_INDEX(zoom_meeting, \'join_url\', -1), \';\', 2), \':\', -2), \'"\', \'\') WHERE zoom_meeting IS NOT NULL');
$this->addSql('ALTER TABLE ws_event CHANGE zoom_meeting meeting_url VARCHAR(255) DEFAULT NULL');
}
public function down(Schema $schema): void
{
// this down() migration is auto-generated, please modify it to your needs
$this->addSql('UPDATE ws_event SET meeting_url = NULL');
$this->addSql('ALTER TABLE ws_event CHANGE meeting_url zoom_meeting LONGTEXT DEFAULT NULL COMMENT \'(DC2Type:array)\'');
}
}