| Conditions | 2 |
| Paths | 2 |
| Total Lines | 13 |
| Code Lines | 8 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 1 |
| 1 | <?php |
||
| 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;'); |
||
| 29 | } |
||
| 30 | |||
| 31 | $this->addSql('ALTER TABLE agenda_reminder ADD CONSTRAINT FK_416FFA2471F7E88B FOREIGN KEY (event_id) REFERENCES c_calendar_event (iid)'); |
||
| 32 | $this->addSql('CREATE INDEX IDX_416FFA2471F7E88B ON agenda_reminder (event_id)'); |
||
| 33 | } |
||
| 34 | } |