<?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 Version20260205095551 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 channel_user_data_cursus_founder CHANGE amount_hours amount_time INT NOT NULL');
$this->addSql('ALTER TABLE channel_sessions CHANGE count_hours_in_center duration_in_center INT DEFAULT 0 NOT NULL, CHANGE count_hours_in_company duration_in_company INT DEFAULT 0 NOT NULL, CHANGE count_hours_visio duration_in_visio INT DEFAULT 0 NOT NULL, CHANGE count_hours_elearning duration_in_elearning INT DEFAULT 0 NOT NULL, CHANGE count_hours_exam duration_in_exam INT DEFAULT 0 NOT NULL');
$this->addSql('UPDATE channel_sessions SET duration_in_center = duration_in_center * 60');
$this->addSql('UPDATE channel_sessions SET duration_in_company = duration_in_company * 60');
$this->addSql('UPDATE channel_sessions SET duration_in_visio = duration_in_visio * 60');
$this->addSql('UPDATE channel_sessions SET duration_in_elearning = duration_in_elearning * 60');
$this->addSql('UPDATE channel_sessions SET duration_in_exam = duration_in_exam * 60');
$this->addSql('UPDATE channel_user_data_cursus SET exam_duration = exam_duration * 60');
$this->addSql('UPDATE channel_user_data_cursus SET physical_duration = physical_duration * 60');
$this->addSql('UPDATE channel_user_data_cursus SET distance_async_duration = distance_async_duration * 60');
$this->addSql('UPDATE channel_user_data_cursus SET distance_sync_duration = distance_sync_duration * 60');
$this->addSql('UPDATE channel_user_data_cursus SET internship_duration = internship_duration * 60');
$this->addSql('UPDATE channel_user_data_cursus_internship SET duration = duration * 60');
$this->addSql('UPDATE channel_user_data_cursus_founder SET amount_time = amount_time * 60');
}
public function down(Schema $schema): void
{
// this down() migration is auto-generated, please modify it to your needs
$this->addSql('ALTER TABLE channel_user_data_cursus_founder CHANGE amount_time amount_hours INT NOT NULL');
$this->addSql('ALTER TABLE channel_sessions ADD count_hours_in_center INT DEFAULT 0 NOT NULL, ADD count_hours_in_company INT DEFAULT 0 NOT NULL, ADD count_hours_visio INT DEFAULT 0 NOT NULL, ADD count_hours_elearning INT DEFAULT 0 NOT NULL, ADD count_hours_exam INT DEFAULT 0 NOT NULL, DROP duration_in_center, DROP duration_in_company, DROP duration_in_visio, DROP duration_in_elearning, DROP duration_in_exam');
}
}