<?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 Version20250113130845 extends AbstractMigration
{
public function getDescription(): string
{
return '';
}
public function up(Schema $schema): void
{
$this->addSql("ALTER TABLE `dp_shift_days` ADD `is_active` INT NOT NULL DEFAULT '1' AFTER `productive_time`");
$this->addSql("UPDATE dp_shift_days AS dsd INNER JOIN dp_week_days AS dwd ON dsd.week_day_id = dwd.id SET dsd.is_active = 0 WHERE dwd.week_day = 'Saturday'");
}
public function down(Schema $schema): void
{
$this->addSql("ALTER TABLE `dp_shift_days` DROP COLUMN `is_active`");
}
}