<?php
declare(strict_types=1);
namespace PlanningBundleMigrations;
use Doctrine\DBAL\Schema\Schema;
use Doctrine\Migrations\AbstractMigration;
final class Version20230524132703 extends AbstractMigration
{
public function up(Schema $schema): void
{
$this->addSql('ALTER TABLE planning_bundle__slot ADD is_holiday TINYINT(1) NOT NULL');
}
public function down(Schema $schema): void
{
$this->addSql('ALTER TABLE planning_bundle__slot DROP is_holiday');
}
public function postUp(Schema $schema): void
{
parent::postUp($schema);
shell_exec('bin/console do:fi:lo --append --group=planning_bundle_public_holidays');
$this->connection->insert('cron_job', [
'name' => 'planning-google-channel-refresh',
'command' => 'bluue-bundle:planning:google-channel-refresh',
'schedule' => '0 2 * * *',
'description' => '',
'enabled' => 1
]);
}
}