Fix migration error

remotes/angel/1.11.x
jmontoyaa 8 years ago
parent a43f42e788
commit a0665ba22e
  1. 1
      app/Migrations/Schema/V111/Version111.php

@ -20,6 +20,7 @@ class Version111 extends AbstractMigrationChamilo
*/
public function up(Schema $schema)
{
$this->addSql("ALTER TABLE extra_field ENGINE=InnoDB");
$this->addSql('CREATE TABLE extra_field_saved_search (id INT AUTO_INCREMENT NOT NULL, field_id INT DEFAULT NULL, user_id INT DEFAULT NULL, value LONGTEXT DEFAULT NULL COLLATE utf8_unicode_ci, created_at DATETIME NOT NULL, updated_at DATETIME NOT NULL, INDEX IDX_16ABE32A443707B0 (field_id), INDEX IDX_16ABE32AA76ED395 (user_id), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci ENGINE = InnoDB');
$this->addSql('ALTER TABLE extra_field_saved_search ADD CONSTRAINT FK_16ABE32A443707B0 FOREIGN KEY (field_id) REFERENCES extra_field (id)');
$this->addSql('ALTER TABLE extra_field_saved_search ADD CONSTRAINT FK_16ABE32AA76ED395 FOREIGN KEY (user_id) REFERENCES user (id)');

Loading…
Cancel
Save