diff --git a/app/Migrations/Schema/V111/Version111.php b/app/Migrations/Schema/V111/Version111.php index 2cdb32960d..1d2b8bdf05 100644 --- a/app/Migrations/Schema/V111/Version111.php +++ b/app/Migrations/Schema/V111/Version111.php @@ -24,7 +24,7 @@ class Version111 extends AbstractMigrationChamilo $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)'); - + $this->addSql("ALTER TABLE extra_field_saved_search CHANGE value value LONGTEXT DEFAULT NULL COMMENT '(DC2Type:array)'"); $this->addSql('CREATE TABLE c_lp_category_user (id INT AUTO_INCREMENT NOT NULL, category_id INT DEFAULT NULL, INDEX IDX_61F042712469DE2 (category_id), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci ENGINE = InnoDB'); $this->addSql('ALTER TABLE c_lp_category_user ADD CONSTRAINT FK_61F042712469DE2 FOREIGN KEY (category_id) REFERENCES c_lp_category (iid)'); diff --git a/src/Chamilo/CoreBundle/Entity/ExtraFieldSavedSearch.php b/src/Chamilo/CoreBundle/Entity/ExtraFieldSavedSearch.php new file mode 100644 index 0000000000..20401dd533 --- /dev/null +++ b/src/Chamilo/CoreBundle/Entity/ExtraFieldSavedSearch.php @@ -0,0 +1,166 @@ +id; + } + + /** + * @return ExtraField + */ + public function getField() + { + return $this->field; + } + + /** + * @param ExtraField $field + * @return ExtraFieldSavedSearch + */ + public function setField($field) + { + $this->field = $field; + return $this; + } + + /** + * @return User + */ + public function getUser() + { + return $this->user; + } + + /** + * @param User $user + * @return ExtraFieldSavedSearch + */ + public function setUser($user) + { + $this->user = $user; + return $this; + } + + /** + * @return string + */ + public function getValue() + { + return $this->value; + } + + /** + * @param string $value + * @return ExtraFieldSavedSearch + */ + public function setValue($value) + { + $this->value = $value; + + return $this; + } + + /** + * @return \DateTime + */ + public function getCreatedAt() + { + return $this->createdAt; + } + + /** + * @param \DateTime $createdAt + * @return ExtraFieldSavedSearch + */ + public function setCreatedAt($createdAt) + { + $this->createdAt = $createdAt; + return $this; + } + + /** + * @return \DateTime + */ + public function getUpdatedAt() + { + return $this->updatedAt; + } + + /** + * @param \DateTime $updatedAt + * @return ExtraFieldSavedSearch + */ + public function setUpdatedAt($updatedAt) + { + $this->updatedAt = $updatedAt; + return $this; + } +}