diff options
author | Nicolas LÅ“uillet <nicolas@loeuillet.org> | 2016-08-23 16:49:12 +0200 |
---|---|---|
committer | Nicolas LÅ“uillet <nicolas@loeuillet.org> | 2016-08-23 16:49:21 +0200 |
commit | f1be7af446052c6fed7033664c6c6350f558961b (patch) | |
tree | 41889e7ace01b1f1df05ffb412bac0427d9975a2 /app/DoctrineMigrations | |
parent | 3377c938f8e5bd6af2cd4430494f39a517a7e910 (diff) | |
download | wallabag-f1be7af446052c6fed7033664c6c6350f558961b.tar.gz wallabag-f1be7af446052c6fed7033664c6c6350f558961b.tar.zst wallabag-f1be7af446052c6fed7033664c6c6350f558961b.zip |
Change share entry behavior
Diffstat (limited to 'app/DoctrineMigrations')
-rw-r--r-- | app/DoctrineMigrations/Version20160410190541.php | 12 |
1 files changed, 0 insertions, 12 deletions
diff --git a/app/DoctrineMigrations/Version20160410190541.php b/app/DoctrineMigrations/Version20160410190541.php index f35f54ce..77c78c54 100644 --- a/app/DoctrineMigrations/Version20160410190541.php +++ b/app/DoctrineMigrations/Version20160410190541.php | |||
@@ -28,18 +28,6 @@ class Version20160410190541 extends AbstractMigration implements ContainerAwareI | |||
28 | $this->addSql('ALTER TABLE `wallabag_entry` ADD `uuid` LONGTEXT DEFAULT NULL'); | 28 | $this->addSql('ALTER TABLE `wallabag_entry` ADD `uuid` LONGTEXT DEFAULT NULL'); |
29 | } | 29 | } |
30 | 30 | ||
31 | public function postUp(Schema $schema) | ||
32 | { | ||
33 | $em = $this->container->get('doctrine.orm.entity_manager'); | ||
34 | $repository = $em->getRepository('WallabagCoreBundle:Entry'); | ||
35 | $entries = $repository->findAll(); | ||
36 | |||
37 | /** @var Entry $entry */ | ||
38 | foreach ($entries as $entry) { | ||
39 | $this->addSql('UPDATE `wallabag_entry` SET `uuid` = "'.uniqid('', true).'" WHERE id = '.$entry->getId()); | ||
40 | } | ||
41 | } | ||
42 | |||
43 | /** | 31 | /** |
44 | * @param Schema $schema | 32 | * @param Schema $schema |
45 | */ | 33 | */ |