<?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 Version20240116155558 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 user ADD google_access_meet TINYINT(1) NOT NULL');
$this->addSql('UPDATE user SET google_access_data = REPLACE(google_access_data, \'s:17:"resource_owner_id";\', \'s:10:"account_id";\') WHERE google_access_data IS NOT NULL');
$this->addSql('UPDATE user SET zoom_access_data = REPLACE(zoom_access_data, \'s:17:"resource_owner_id";\', \'s:10:"account_id";\') WHERE zoom_access_data IS NOT NULL');
}
public function down(Schema $schema): void
{
// this down() migration is auto-generated, please modify it to your needs
$this->addSql('ALTER TABLE user DROP google_access_meet');
$this->addSql('UPDATE user SET google_access_data = REPLACE(google_access_data, \'s:10:"account_id";\', \'s:17:"resource_owner_id";\') WHERE google_access_data IS NOT NULL');
$this->addSql('UPDATE user SET zoom_access_data = REPLACE(zoom_access_data, \'s:10:"account_id";\', \'s:17:"resource_owner_id";\') WHERE zoom_access_data IS NOT NULL');
}
}