class Version20240425192900 extends AbstractMigration
11
{
12
public function getDescription(): string
13
{
14
return 'Changes on the agenda_reminder structure';
15
}
16
17
/**
18
* @inheritDoc
19
*/
20
public function up(Schema $schema): void
21
{
22
if (!$schema->hasTable('agenda_reminder')) {
23
$this->addSql(
24
'CREATE TABLE agenda_reminder (id INT AUTO_INCREMENT NOT NULL, event_id INT NOT NULL, date_interval VARCHAR(255) NOT NULL COMMENT "(DC2Type:dateinterval)", sent TINYINT(1) NOT NULL, created_at DATETIME NOT NULL COMMENT "(DC2Type:datetime)", updated_at DATETIME NOT NULL COMMENT "(DC2Type:datetime)", PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB ROW_FORMAT = DYNAMIC;'
25
);
26
} else {
27
$this->addSql('ALTER TABLE agenda_reminder DROP type');
28
$this->addSql('ALTER TABLE agenda_reminder CHANGE id id INT AUTO_INCREMENT NOT NULL;');