X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=app%2FDoctrineMigrations%2FVersion20190401105353.php;h=600fc162152ca9662b22df7f83971893b17cdf34;hb=996b2ec17070bb33ce9cd2ec570289565fd66306;hp=c1c220537e21be19530301e84adbb52b7af79a2e;hpb=8a6456629814039cfc623cdb279bcba06dacff50;p=github%2Fwallabag%2Fwallabag.git diff --git a/app/DoctrineMigrations/Version20190401105353.php b/app/DoctrineMigrations/Version20190401105353.php index c1c22053..600fc162 100644 --- a/app/DoctrineMigrations/Version20190401105353.php +++ b/app/DoctrineMigrations/Version20190401105353.php @@ -10,9 +10,6 @@ use Wallabag\CoreBundle\Doctrine\WallabagMigration; */ class Version20190401105353 extends WallabagMigration { - /** - * @param Schema $schema - */ public function up(Schema $schema) { $entryTable = $schema->getTable($this->getTable('entry')); @@ -24,17 +21,9 @@ class Version20190401105353 extends WallabagMigration 'notnull' => false, ]); - // sqlite doesn't have the MD5 function by default - if ('sqlite' !== $this->connection->getDatabasePlatform()->getName()) { - $this->addSql('UPDATE ' . $this->getTable('entry') . ' SET hashed_url = MD5(url)'); - } - - $entryTable->addIndex(['user_id', 'hashed_url'], 'hashed_url_user_id'); + $entryTable->addIndex(['user_id', 'hashed_url'], 'hashed_url_user_id', [], ['lengths' => [null, 40]]); } - /** - * @param Schema $schema - */ public function down(Schema $schema) { $entryTable = $schema->getTable($this->getTable('entry'));