diff --git a/lib/Alchemy/Phrasea/Border/Manager.php b/lib/Alchemy/Phrasea/Border/Manager.php index 0b16e7f254..d8abc9ac99 100644 --- a/lib/Alchemy/Phrasea/Border/Manager.php +++ b/lib/Alchemy/Phrasea/Border/Manager.php @@ -401,11 +401,6 @@ class Manager } } - $recordIds = $lazaretFile->getRecordIdsByCheckers($this->app); - - /** $recordIds will be serialized */ - $lazaretFile->setRecordIds($recordIds); - $this->app['orm.em']->flush(); return $lazaretFile; diff --git a/lib/Alchemy/Phrasea/Controller/Api/V1Controller.php b/lib/Alchemy/Phrasea/Controller/Api/V1Controller.php index efb5a8e875..eb5fe4646f 100644 --- a/lib/Alchemy/Phrasea/Controller/Api/V1Controller.php +++ b/lib/Alchemy/Phrasea/Controller/Api/V1Controller.php @@ -707,7 +707,7 @@ class V1Controller extends Controller 'id' => $file->getId(), 'quarantine_session' => $session, 'base_id' => $file->getBaseId(), - 'record_id' => $file->getRecordIds()?:[], + 'record_id' => $file->getRecordIdsByCheckers($this->app)?:[], 'original_name' => $file->getOriginalName(), 'sha256' => $file->getSha256(), 'uuid' => $file->getUuid(), diff --git a/lib/Alchemy/Phrasea/Model/Entities/LazaretFile.php b/lib/Alchemy/Phrasea/Model/Entities/LazaretFile.php index afa818c327..1ff2d26236 100644 --- a/lib/Alchemy/Phrasea/Model/Entities/LazaretFile.php +++ b/lib/Alchemy/Phrasea/Model/Entities/LazaretFile.php @@ -49,11 +49,6 @@ class LazaretFile */ private $base_id; - /** - * @ORM\Column(type="string", length=512) - */ - private $record_ids; - /** * @ORM\Column(type="string", length=36) */ @@ -210,29 +205,6 @@ class LazaretFile return $this->base_id; } - /** - * Set record_ids - * - * @param mixed $recordIds - * @return LazaretFile - */ - public function setRecordIds($recordIds) - { - $this->record_ids = serialize($recordIds); - - return $this; - } - - /** - * Get record_ids - * - * @return mixed - */ - public function getRecordIds() - { - return unserialize($this->record_ids); - } - /** * Get the Destination Collection * diff --git a/lib/Alchemy/Phrasea/Setup/DoctrineMigrations/Version20180222113704.php b/lib/Alchemy/Phrasea/Setup/DoctrineMigrations/Version20180222113704.php deleted file mode 100644 index a54af53e2c..0000000000 --- a/lib/Alchemy/Phrasea/Setup/DoctrineMigrations/Version20180222113704.php +++ /dev/null @@ -1,27 +0,0 @@ -addSql('ALTER TABLE LazaretFiles ADD record_ids VARCHAR(512) NOT NULL AFTER base_id'); - } - - /** - * @param Schema $schema - */ - public function doDownSql(Schema $schema) - { - $this->addSql('ALTER TABLE LazaretFiles DROP record_ids'); - } -} diff --git a/tests/Alchemy/Tests/Phrasea/Controller/Prod/LazaretTest.php b/tests/Alchemy/Tests/Phrasea/Controller/Prod/LazaretTest.php index abde12c72e..82c916e197 100644 --- a/tests/Alchemy/Tests/Phrasea/Controller/Prod/LazaretTest.php +++ b/tests/Alchemy/Tests/Phrasea/Controller/Prod/LazaretTest.php @@ -507,7 +507,6 @@ class LazaretTest extends \PhraseanetAuthenticatedWebTestCase $lazaretFile->setUuid('7b8ef0e3-dc8f-4b66-9e2f-bd049d175124'); $lazaretFile->setCreated(new \DateTime('-1 day')); $lazaretFile->setUpdated(new \DateTime('now')); - $lazaretFile->setRecordIds([1]); return $lazaretFile; }