use Chamilo\CoreBundle\Migrations\AbstractMigrationChamilo;
9
use Doctrine\DBAL\Schema\Schema;
10
11
final class Version20240323222700 extends AbstractMigrationChamilo
12
{
13
public function getDescription(): string
14
{
15
return 'Remove the sys_calendar table';
16
}
17
18
public function up(Schema $schema): void
19
{
20
$this->addSql('DROP TABLE IF EXISTS sys_calendar');
21
}
22
23
public function down(Schema $schema): void
24
{
25
if (!$schema->hasTable('sys_calendar')) {
26
$this->addSql('CREATE TABLE sys_calendar (id INT AUTO_INCREMENT NOT NULL, title VARCHAR(255) NOT NULL, content LONGTEXT DEFAULT NULL, start_date DATETIME DEFAULT NULL, end_date DATETIME DEFAULT NULL, access_url_id INT DEFAULT NULL, all_day INT NOT NULL, color VARCHAR(20) DEFAULT NULL, PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB');