|
@@ -33,12 +33,17 @@ class Version20161028123400 extends AbstractMigrationChamilo
|
|
|
|
|
|
$table = $schema->getTable('personal_agenda');
|
|
$table = $schema->getTable('personal_agenda');
|
|
if ($table->hasIndex('id')) {
|
|
if ($table->hasIndex('id')) {
|
|
|
|
+ $this->addSql('ALTER TABLE personal_agenda DROP INDEX id');
|
|
|
|
+ $this->addSql('ALTER TABLE personal_agenda DROP INDEX idx_personal_agenda_user');
|
|
|
|
+ $this->addSql('ALTER TABLE personal_agenda DROP INDEX idx_personal_agenda_parent');
|
|
$this->addSql('ALTER TABLE personal_agenda modify id INT NOT NULL');
|
|
$this->addSql('ALTER TABLE personal_agenda modify id INT NOT NULL');
|
|
- $table->dropIndex('id');
|
|
|
|
if ($table->hasPrimaryKey()) {
|
|
if ($table->hasPrimaryKey()) {
|
|
- $table->dropPrimaryKey();
|
|
|
|
|
|
+ $this->addSql('ALTER TABLE personal_agenda drop primary key ');
|
|
}
|
|
}
|
|
|
|
+
|
|
$this->addSql('ALTER TABLE personal_agenda CHANGE id id INT AUTO_INCREMENT NOT NULL PRIMARY KEY');
|
|
$this->addSql('ALTER TABLE personal_agenda CHANGE id id INT AUTO_INCREMENT NOT NULL PRIMARY KEY');
|
|
|
|
+ $this->addSql('CREATE INDEX idx_personal_agenda_user ON personal_agenda (user)');
|
|
|
|
+ $this->addSql('CREATE INDEX idx_personal_agenda_parent ON personal_agenda (parent_event_id)');
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|