diff options
author | Jérémy Benoist <j0k3r@users.noreply.github.com> | 2017-04-14 14:56:26 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-04-14 14:56:26 +0200 |
commit | 531828ca44604b85c3053e202e991809a4701f3b (patch) | |
tree | 80756e0bb5bf9f85f115e1eb6a26547ca7be2a1a /app | |
parent | 3e7a843aa998442148061347e7978722b8cd87d2 (diff) | |
parent | 01736b5a2ee2a48403a2462014886bf009f18786 (diff) | |
download | wallabag-531828ca44604b85c3053e202e991809a4701f3b.tar.gz wallabag-531828ca44604b85c3053e202e991809a4701f3b.tar.zst wallabag-531828ca44604b85c3053e202e991809a4701f3b.zip |
Merge pull request #3030 from wallabag/remove-isPublic-from-entry
Remove isPublic from Entry entity fix #2598
Diffstat (limited to 'app')
-rw-r--r-- | app/DoctrineMigrations/Version20160410190541.php | 2 | ||||
-rw-r--r-- | app/DoctrineMigrations/Version20160812120952.php | 2 | ||||
-rw-r--r-- | app/DoctrineMigrations/Version20160911214952.php | 2 | ||||
-rw-r--r-- | app/DoctrineMigrations/Version20160916201049.php | 2 | ||||
-rw-r--r-- | app/DoctrineMigrations/Version20161001072726.php | 2 | ||||
-rw-r--r-- | app/DoctrineMigrations/Version20161022134138.php | 2 | ||||
-rw-r--r-- | app/DoctrineMigrations/Version20161024212538.php | 2 | ||||
-rw-r--r-- | app/DoctrineMigrations/Version20161031132655.php | 2 | ||||
-rw-r--r-- | app/DoctrineMigrations/Version20161104073720.php | 2 | ||||
-rw-r--r-- | app/DoctrineMigrations/Version20161106113822.php | 2 | ||||
-rw-r--r-- | app/DoctrineMigrations/Version20161117071626.php | 2 | ||||
-rw-r--r-- | app/DoctrineMigrations/Version20161214094402.php | 2 | ||||
-rw-r--r-- | app/DoctrineMigrations/Version20161214094403.php | 2 | ||||
-rw-r--r-- | app/DoctrineMigrations/Version20170127093841.php | 2 | ||||
-rw-r--r-- | app/DoctrineMigrations/Version20170407200919.php | 51 |
15 files changed, 65 insertions, 14 deletions
diff --git a/app/DoctrineMigrations/Version20160410190541.php b/app/DoctrineMigrations/Version20160410190541.php index 6294d842..5e5cae35 100644 --- a/app/DoctrineMigrations/Version20160410190541.php +++ b/app/DoctrineMigrations/Version20160410190541.php | |||
@@ -8,7 +8,7 @@ use Symfony\Component\DependencyInjection\ContainerAwareInterface; | |||
8 | use Symfony\Component\DependencyInjection\ContainerInterface; | 8 | use Symfony\Component\DependencyInjection\ContainerInterface; |
9 | 9 | ||
10 | /** | 10 | /** |
11 | * Added foreign keys for account resetting | 11 | * Added foreign keys for account resetting. |
12 | */ | 12 | */ |
13 | class Version20160410190541 extends AbstractMigration implements ContainerAwareInterface | 13 | class Version20160410190541 extends AbstractMigration implements ContainerAwareInterface |
14 | { | 14 | { |
diff --git a/app/DoctrineMigrations/Version20160812120952.php b/app/DoctrineMigrations/Version20160812120952.php index bd6e8d63..13272267 100644 --- a/app/DoctrineMigrations/Version20160812120952.php +++ b/app/DoctrineMigrations/Version20160812120952.php | |||
@@ -8,7 +8,7 @@ use Symfony\Component\DependencyInjection\ContainerAwareInterface; | |||
8 | use Symfony\Component\DependencyInjection\ContainerInterface; | 8 | use Symfony\Component\DependencyInjection\ContainerInterface; |
9 | 9 | ||
10 | /** | 10 | /** |
11 | * Added name field on wallabag_oauth2_clients | 11 | * Added name field on wallabag_oauth2_clients. |
12 | */ | 12 | */ |
13 | class Version20160812120952 extends AbstractMigration implements ContainerAwareInterface | 13 | class Version20160812120952 extends AbstractMigration implements ContainerAwareInterface |
14 | { | 14 | { |
diff --git a/app/DoctrineMigrations/Version20160911214952.php b/app/DoctrineMigrations/Version20160911214952.php index edef81ed..4eae46e7 100644 --- a/app/DoctrineMigrations/Version20160911214952.php +++ b/app/DoctrineMigrations/Version20160911214952.php | |||
@@ -8,7 +8,7 @@ use Symfony\Component\DependencyInjection\ContainerAwareInterface; | |||
8 | use Symfony\Component\DependencyInjection\ContainerInterface; | 8 | use Symfony\Component\DependencyInjection\ContainerInterface; |
9 | 9 | ||
10 | /** | 10 | /** |
11 | * Added settings for RabbitMQ and Redis imports | 11 | * Added settings for RabbitMQ and Redis imports. |
12 | */ | 12 | */ |
13 | class Version20160911214952 extends AbstractMigration implements ContainerAwareInterface | 13 | class Version20160911214952 extends AbstractMigration implements ContainerAwareInterface |
14 | { | 14 | { |
diff --git a/app/DoctrineMigrations/Version20160916201049.php b/app/DoctrineMigrations/Version20160916201049.php index 9f8e77e7..ff34c894 100644 --- a/app/DoctrineMigrations/Version20160916201049.php +++ b/app/DoctrineMigrations/Version20160916201049.php | |||
@@ -8,7 +8,7 @@ use Symfony\Component\DependencyInjection\ContainerAwareInterface; | |||
8 | use Symfony\Component\DependencyInjection\ContainerInterface; | 8 | use Symfony\Component\DependencyInjection\ContainerInterface; |
9 | 9 | ||
10 | /** | 10 | /** |
11 | * Added pocket_consumer_key field on wallabag_config | 11 | * Added pocket_consumer_key field on wallabag_config. |
12 | */ | 12 | */ |
13 | class Version20160916201049 extends AbstractMigration implements ContainerAwareInterface | 13 | class Version20160916201049 extends AbstractMigration implements ContainerAwareInterface |
14 | { | 14 | { |
diff --git a/app/DoctrineMigrations/Version20161001072726.php b/app/DoctrineMigrations/Version20161001072726.php index f247c236..ad761541 100644 --- a/app/DoctrineMigrations/Version20161001072726.php +++ b/app/DoctrineMigrations/Version20161001072726.php | |||
@@ -9,7 +9,7 @@ use Symfony\Component\DependencyInjection\ContainerInterface; | |||
9 | use Doctrine\DBAL\Migrations\SkipMigrationException; | 9 | use Doctrine\DBAL\Migrations\SkipMigrationException; |
10 | 10 | ||
11 | /** | 11 | /** |
12 | * Added pocket_consumer_key field on wallabag_config | 12 | * Added pocket_consumer_key field on wallabag_config. |
13 | */ | 13 | */ |
14 | class Version20161001072726 extends AbstractMigration implements ContainerAwareInterface | 14 | class Version20161001072726 extends AbstractMigration implements ContainerAwareInterface |
15 | { | 15 | { |
diff --git a/app/DoctrineMigrations/Version20161022134138.php b/app/DoctrineMigrations/Version20161022134138.php index c71166a0..39949e7d 100644 --- a/app/DoctrineMigrations/Version20161022134138.php +++ b/app/DoctrineMigrations/Version20161022134138.php | |||
@@ -8,7 +8,7 @@ use Symfony\Component\DependencyInjection\ContainerAwareInterface; | |||
8 | use Symfony\Component\DependencyInjection\ContainerInterface; | 8 | use Symfony\Component\DependencyInjection\ContainerInterface; |
9 | 9 | ||
10 | /** | 10 | /** |
11 | * Converted database to utf8mb4 encoding (for MySQL only) | 11 | * Converted database to utf8mb4 encoding (for MySQL only). |
12 | */ | 12 | */ |
13 | class Version20161022134138 extends AbstractMigration implements ContainerAwareInterface | 13 | class Version20161022134138 extends AbstractMigration implements ContainerAwareInterface |
14 | { | 14 | { |
diff --git a/app/DoctrineMigrations/Version20161024212538.php b/app/DoctrineMigrations/Version20161024212538.php index ecb872d1..b2f6aaf8 100644 --- a/app/DoctrineMigrations/Version20161024212538.php +++ b/app/DoctrineMigrations/Version20161024212538.php | |||
@@ -8,7 +8,7 @@ use Symfony\Component\DependencyInjection\ContainerAwareInterface; | |||
8 | use Symfony\Component\DependencyInjection\ContainerInterface; | 8 | use Symfony\Component\DependencyInjection\ContainerInterface; |
9 | 9 | ||
10 | /** | 10 | /** |
11 | * Added user_id column on oauth2_clients to prevent users to delete API clients from other users | 11 | * Added user_id column on oauth2_clients to prevent users to delete API clients from other users. |
12 | */ | 12 | */ |
13 | class Version20161024212538 extends AbstractMigration implements ContainerAwareInterface | 13 | class Version20161024212538 extends AbstractMigration implements ContainerAwareInterface |
14 | { | 14 | { |
diff --git a/app/DoctrineMigrations/Version20161031132655.php b/app/DoctrineMigrations/Version20161031132655.php index 83b97ca9..ef846412 100644 --- a/app/DoctrineMigrations/Version20161031132655.php +++ b/app/DoctrineMigrations/Version20161031132655.php | |||
@@ -8,7 +8,7 @@ use Symfony\Component\DependencyInjection\ContainerAwareInterface; | |||
8 | use Symfony\Component\DependencyInjection\ContainerInterface; | 8 | use Symfony\Component\DependencyInjection\ContainerInterface; |
9 | 9 | ||
10 | /** | 10 | /** |
11 | * Added the internal setting to enable/disable downloading pictures | 11 | * Added the internal setting to enable/disable downloading pictures. |
12 | */ | 12 | */ |
13 | class Version20161031132655 extends AbstractMigration implements ContainerAwareInterface | 13 | class Version20161031132655 extends AbstractMigration implements ContainerAwareInterface |
14 | { | 14 | { |
diff --git a/app/DoctrineMigrations/Version20161104073720.php b/app/DoctrineMigrations/Version20161104073720.php index fb8f5fa1..0e05f02e 100644 --- a/app/DoctrineMigrations/Version20161104073720.php +++ b/app/DoctrineMigrations/Version20161104073720.php | |||
@@ -8,7 +8,7 @@ use Symfony\Component\DependencyInjection\ContainerAwareInterface; | |||
8 | use Symfony\Component\DependencyInjection\ContainerInterface; | 8 | use Symfony\Component\DependencyInjection\ContainerInterface; |
9 | 9 | ||
10 | /** | 10 | /** |
11 | * Added created_at index on entry table | 11 | * Added created_at index on entry table. |
12 | */ | 12 | */ |
13 | class Version20161104073720 extends AbstractMigration implements ContainerAwareInterface | 13 | class Version20161104073720 extends AbstractMigration implements ContainerAwareInterface |
14 | { | 14 | { |
diff --git a/app/DoctrineMigrations/Version20161106113822.php b/app/DoctrineMigrations/Version20161106113822.php index de3702a4..facc14f4 100644 --- a/app/DoctrineMigrations/Version20161106113822.php +++ b/app/DoctrineMigrations/Version20161106113822.php | |||
@@ -8,7 +8,7 @@ use Symfony\Component\DependencyInjection\ContainerAwareInterface; | |||
8 | use Symfony\Component\DependencyInjection\ContainerInterface; | 8 | use Symfony\Component\DependencyInjection\ContainerInterface; |
9 | 9 | ||
10 | /** | 10 | /** |
11 | * Added action_mark_as_read field on config table | 11 | * Added action_mark_as_read field on config table. |
12 | */ | 12 | */ |
13 | class Version20161106113822 extends AbstractMigration implements ContainerAwareInterface | 13 | class Version20161106113822 extends AbstractMigration implements ContainerAwareInterface |
14 | { | 14 | { |
diff --git a/app/DoctrineMigrations/Version20161117071626.php b/app/DoctrineMigrations/Version20161117071626.php index 8daa2142..e779eacf 100644 --- a/app/DoctrineMigrations/Version20161117071626.php +++ b/app/DoctrineMigrations/Version20161117071626.php | |||
@@ -8,7 +8,7 @@ use Symfony\Component\DependencyInjection\ContainerAwareInterface; | |||
8 | use Symfony\Component\DependencyInjection\ContainerInterface; | 8 | use Symfony\Component\DependencyInjection\ContainerInterface; |
9 | 9 | ||
10 | /** | 10 | /** |
11 | * Added the internal setting to share articles to unmark.it | 11 | * Added the internal setting to share articles to unmark.it. |
12 | */ | 12 | */ |
13 | class Version20161117071626 extends AbstractMigration implements ContainerAwareInterface | 13 | class Version20161117071626 extends AbstractMigration implements ContainerAwareInterface |
14 | { | 14 | { |
diff --git a/app/DoctrineMigrations/Version20161214094402.php b/app/DoctrineMigrations/Version20161214094402.php index db125f76..8ca32b09 100644 --- a/app/DoctrineMigrations/Version20161214094402.php +++ b/app/DoctrineMigrations/Version20161214094402.php | |||
@@ -8,7 +8,7 @@ use Symfony\Component\DependencyInjection\ContainerAwareInterface; | |||
8 | use Symfony\Component\DependencyInjection\ContainerInterface; | 8 | use Symfony\Component\DependencyInjection\ContainerInterface; |
9 | 9 | ||
10 | /** | 10 | /** |
11 | * Renamed uuid to uid in entry table | 11 | * Renamed uuid to uid in entry table. |
12 | */ | 12 | */ |
13 | class Version20161214094402 extends AbstractMigration implements ContainerAwareInterface | 13 | class Version20161214094402 extends AbstractMigration implements ContainerAwareInterface |
14 | { | 14 | { |
diff --git a/app/DoctrineMigrations/Version20161214094403.php b/app/DoctrineMigrations/Version20161214094403.php index 5948b5fa..c7326f95 100644 --- a/app/DoctrineMigrations/Version20161214094403.php +++ b/app/DoctrineMigrations/Version20161214094403.php | |||
@@ -8,7 +8,7 @@ use Symfony\Component\DependencyInjection\ContainerAwareInterface; | |||
8 | use Symfony\Component\DependencyInjection\ContainerInterface; | 8 | use Symfony\Component\DependencyInjection\ContainerInterface; |
9 | 9 | ||
10 | /** | 10 | /** |
11 | * Added index on wallabag_entry.uid | 11 | * Added index on wallabag_entry.uid. |
12 | */ | 12 | */ |
13 | class Version20161214094403 extends AbstractMigration implements ContainerAwareInterface | 13 | class Version20161214094403 extends AbstractMigration implements ContainerAwareInterface |
14 | { | 14 | { |
diff --git a/app/DoctrineMigrations/Version20170127093841.php b/app/DoctrineMigrations/Version20170127093841.php index 20c79479..5bfd9670 100644 --- a/app/DoctrineMigrations/Version20170127093841.php +++ b/app/DoctrineMigrations/Version20170127093841.php | |||
@@ -8,7 +8,7 @@ use Symfony\Component\DependencyInjection\ContainerAwareInterface; | |||
8 | use Symfony\Component\DependencyInjection\ContainerInterface; | 8 | use Symfony\Component\DependencyInjection\ContainerInterface; |
9 | 9 | ||
10 | /** | 10 | /** |
11 | * Added indexes on wallabag_entry.is_starred and wallabag_entry.is_archived | 11 | * Added indexes on wallabag_entry.is_starred and wallabag_entry.is_archived. |
12 | */ | 12 | */ |
13 | class Version20170127093841 extends AbstractMigration implements ContainerAwareInterface | 13 | class Version20170127093841 extends AbstractMigration implements ContainerAwareInterface |
14 | { | 14 | { |
diff --git a/app/DoctrineMigrations/Version20170407200919.php b/app/DoctrineMigrations/Version20170407200919.php new file mode 100644 index 00000000..4b9d475a --- /dev/null +++ b/app/DoctrineMigrations/Version20170407200919.php | |||
@@ -0,0 +1,51 @@ | |||
1 | <?php | ||
2 | |||
3 | namespace Application\Migrations; | ||
4 | |||
5 | use Doctrine\DBAL\Migrations\AbstractMigration; | ||
6 | use Doctrine\DBAL\Schema\Schema; | ||
7 | use Symfony\Component\DependencyInjection\ContainerAwareInterface; | ||
8 | use Symfony\Component\DependencyInjection\ContainerInterface; | ||
9 | |||
10 | /** | ||
11 | * Remove isPublic in Entry Table. | ||
12 | */ | ||
13 | class Version20170407200919 extends AbstractMigration implements ContainerAwareInterface | ||
14 | { | ||
15 | /** | ||
16 | * @var ContainerInterface | ||
17 | */ | ||
18 | private $container; | ||
19 | |||
20 | public function setContainer(ContainerInterface $container = null) | ||
21 | { | ||
22 | $this->container = $container; | ||
23 | } | ||
24 | |||
25 | private function getTable($tableName) | ||
26 | { | ||
27 | return $this->container->getParameter('database_table_prefix').$tableName; | ||
28 | } | ||
29 | |||
30 | /** | ||
31 | * @param Schema $schema | ||
32 | */ | ||
33 | public function up(Schema $schema) | ||
34 | { | ||
35 | $entryTable = $schema->getTable($this->getTable('entry')); | ||
36 | $this->skipIf(!$entryTable->hasColumn('is_public'), 'It seems that you already played this migration.'); | ||
37 | |||
38 | $entryTable->dropColumn('is_public'); | ||
39 | } | ||
40 | |||
41 | /** | ||
42 | * @param Schema $schema | ||
43 | */ | ||
44 | public function down(Schema $schema) | ||
45 | { | ||
46 | $entryTable = $schema->getTable($this->getTable('entry')); | ||
47 | $this->skipIf($entryTable->hasColumn('is_public'), 'It seems that you already played this migration.'); | ||
48 | |||
49 | $entryTable->addColumn('is_public', 'boolean', ['notnull' => false, 'default' => 0]); | ||
50 | } | ||
51 | } | ||