aboutsummaryrefslogtreecommitdiffhomepage
path: root/app
diff options
context:
space:
mode:
authorlizyn <zhiylin@outlook.com>2020-02-24 10:04:13 +0800
committerGitHub <noreply@github.com>2020-02-24 10:04:13 +0800
commitb19df31d78d881a43bcf6b3215e5fc3781e8e8aa (patch)
treed0d9861694a4b5e5fbfdbeb53c255ecd15fe9328 /app
parent4d0c632c70ea50d459c3c55ddda2e0f394dd51cb (diff)
parent04d918cae0227c06a41d27fb6533dddbf30dfe71 (diff)
downloadwallabag-b19df31d78d881a43bcf6b3215e5fc3781e8e8aa.tar.gz
wallabag-b19df31d78d881a43bcf6b3215e5fc3781e8e8aa.tar.zst
wallabag-b19df31d78d881a43bcf6b3215e5fc3781e8e8aa.zip
Merge pull request #1 from wallabag/master
Keep up with the master again
Diffstat (limited to 'app')
-rw-r--r--app/AppKernel.php26
-rw-r--r--app/DoctrineMigrations/Version20160401000000.php6
-rw-r--r--app/DoctrineMigrations/Version20160410190541.php6
-rw-r--r--app/DoctrineMigrations/Version20160812120952.php6
-rw-r--r--app/DoctrineMigrations/Version20160911214952.php6
-rw-r--r--app/DoctrineMigrations/Version20160916201049.php6
-rw-r--r--app/DoctrineMigrations/Version20161001072726.php6
-rw-r--r--app/DoctrineMigrations/Version20161022134138.php6
-rw-r--r--app/DoctrineMigrations/Version20161024212538.php6
-rw-r--r--app/DoctrineMigrations/Version20161031132655.php6
-rw-r--r--app/DoctrineMigrations/Version20161104073720.php6
-rw-r--r--app/DoctrineMigrations/Version20161106113822.php6
-rw-r--r--app/DoctrineMigrations/Version20161117071626.php6
-rw-r--r--app/DoctrineMigrations/Version20161118134328.php6
-rw-r--r--app/DoctrineMigrations/Version20161122144743.php6
-rw-r--r--app/DoctrineMigrations/Version20161122203647.php6
-rw-r--r--app/DoctrineMigrations/Version20161128084725.php6
-rw-r--r--app/DoctrineMigrations/Version20161128131503.php6
-rw-r--r--app/DoctrineMigrations/Version20161214094402.php6
-rw-r--r--app/DoctrineMigrations/Version20161214094403.php6
-rw-r--r--app/DoctrineMigrations/Version20170127093841.php6
-rw-r--r--app/DoctrineMigrations/Version20170327194233.php6
-rw-r--r--app/DoctrineMigrations/Version20170405182620.php6
-rw-r--r--app/DoctrineMigrations/Version20170407200919.php6
-rw-r--r--app/DoctrineMigrations/Version20170420134133.php6
-rw-r--r--app/DoctrineMigrations/Version20170501115751.php6
-rw-r--r--app/DoctrineMigrations/Version20170510082609.php6
-rw-r--r--app/DoctrineMigrations/Version20170511115400.php6
-rw-r--r--app/DoctrineMigrations/Version20170511211659.php26
-rw-r--r--app/DoctrineMigrations/Version20170602075214.php6
-rw-r--r--app/DoctrineMigrations/Version20170606155640.php6
-rw-r--r--app/DoctrineMigrations/Version20170719231144.php6
-rw-r--r--app/DoctrineMigrations/Version20170824113337.php6
-rw-r--r--app/DoctrineMigrations/Version20171008195606.php6
-rw-r--r--app/DoctrineMigrations/Version20171105202000.php6
-rw-r--r--app/DoctrineMigrations/Version20171120163128.php6
-rw-r--r--app/DoctrineMigrations/Version20171125164500.php6
-rwxr-xr-xapp/DoctrineMigrations/Version20180405182455.php45
-rw-r--r--app/DoctrineMigrations/Version20181128203230.php42
-rw-r--r--app/DoctrineMigrations/Version20181202073750.php76
-rw-r--r--app/DoctrineMigrations/Version20190117131816.php32
-rw-r--r--app/DoctrineMigrations/Version20190129120000.php141
-rw-r--r--app/DoctrineMigrations/Version20190401105353.php36
-rw-r--r--app/DoctrineMigrations/Version20190425115043.php58
-rw-r--r--app/DoctrineMigrations/Version20190510141130.php96
-rw-r--r--app/DoctrineMigrations/Version20190511165128.php30
-rw-r--r--app/DoctrineMigrations/Version20190601125843.php48
-rw-r--r--app/DoctrineMigrations/Version20190619093534.php65
-rw-r--r--app/DoctrineMigrations/Version20190708122957.php22
-rw-r--r--app/DoctrineMigrations/Version20190806130304.php116
-rw-r--r--app/DoctrineMigrations/Version20190808124957.php42
-rw-r--r--app/Resources/static/themes/_global/index.js46
-rw-r--r--app/Resources/static/themes/baggy/css/article.scss6
-rw-r--r--app/Resources/static/themes/baggy/css/layout.scss11
-rwxr-xr-xapp/Resources/static/themes/baggy/css/media_queries.scss6
-rw-r--r--app/Resources/static/themes/baggy/css/pictos.scss2
-rw-r--r--app/Resources/static/themes/material/css/article.scss17
-rw-r--r--app/Resources/static/themes/material/css/cards.scss64
-rw-r--r--app/Resources/static/themes/material/css/media_queries.scss29
-rw-r--r--app/Resources/static/themes/material/css/nav.scss5
-rwxr-xr-xapp/Resources/static/themes/material/index.js47
-rw-r--r--app/Resources/static/themes/material/js/tools.js14
-rw-r--r--app/autoload.php13
-rw-r--r--app/config/config.yml77
-rw-r--r--app/config/config_dev.yml2
-rw-r--r--app/config/config_prod.yml3
-rw-r--r--app/config/config_test.yml2
-rw-r--r--app/config/parameters.yml.dist18
-rw-r--r--app/config/parameters_test.yml1
-rw-r--r--app/config/routing.yml44
-rw-r--r--app/config/security.yml19
-rw-r--r--app/config/services.yml6
-rw-r--r--app/config/services_test.yml38
-rw-r--r--app/config/tests/parameters_test.mysql.yml1
-rw-r--r--app/config/tests/parameters_test.pgsql.yml1
-rw-r--r--app/config/tests/parameters_test.sqlite.yml1
-rw-r--r--app/config/wallabag.yml12
77 files changed, 1280 insertions, 316 deletions
diff --git a/app/AppKernel.php b/app/AppKernel.php
index 40726f05..fcf929c6 100644
--- a/app/AppKernel.php
+++ b/app/AppKernel.php
@@ -1,6 +1,7 @@
1<?php 1<?php
2 2
3use Symfony\Component\Config\Loader\LoaderInterface; 3use Symfony\Component\Config\Loader\LoaderInterface;
4use Symfony\Component\DependencyInjection\ContainerBuilder;
4use Symfony\Component\HttpKernel\Kernel; 5use Symfony\Component\HttpKernel\Kernel;
5 6
6class AppKernel extends Kernel 7class AppKernel extends Kernel
@@ -32,6 +33,9 @@ class AppKernel extends Kernel
32 new WhiteOctober\PagerfantaBundle\WhiteOctoberPagerfantaBundle(), 33 new WhiteOctober\PagerfantaBundle\WhiteOctoberPagerfantaBundle(),
33 new FOS\JsRoutingBundle\FOSJsRoutingBundle(), 34 new FOS\JsRoutingBundle\FOSJsRoutingBundle(),
34 new BD\GuzzleSiteAuthenticatorBundle\BDGuzzleSiteAuthenticatorBundle(), 35 new BD\GuzzleSiteAuthenticatorBundle\BDGuzzleSiteAuthenticatorBundle(),
36 new OldSound\RabbitMqBundle\OldSoundRabbitMqBundle(),
37 new Http\HttplugBundle\HttplugBundle(),
38 new Sentry\SentryBundle\SentryBundle(),
35 39
36 // wallabag bundles 40 // wallabag bundles
37 new Wallabag\CoreBundle\WallabagCoreBundle(), 41 new Wallabag\CoreBundle\WallabagCoreBundle(),
@@ -39,25 +43,32 @@ class AppKernel extends Kernel
39 new Wallabag\UserBundle\WallabagUserBundle(), 43 new Wallabag\UserBundle\WallabagUserBundle(),
40 new Wallabag\ImportBundle\WallabagImportBundle(), 44 new Wallabag\ImportBundle\WallabagImportBundle(),
41 new Wallabag\AnnotationBundle\WallabagAnnotationBundle(), 45 new Wallabag\AnnotationBundle\WallabagAnnotationBundle(),
42 new OldSound\RabbitMqBundle\OldSoundRabbitMqBundle(),
43 ]; 46 ];
44 47
45 if (in_array($this->getEnvironment(), ['dev', 'test'], true)) { 48 if (in_array($this->getEnvironment(), ['dev', 'test'], true)) {
46 $bundles[] = new Symfony\Bundle\DebugBundle\DebugBundle(); 49 $bundles[] = new Symfony\Bundle\DebugBundle\DebugBundle();
47 $bundles[] = new Symfony\Bundle\WebProfilerBundle\WebProfilerBundle(); 50 $bundles[] = new Symfony\Bundle\WebProfilerBundle\WebProfilerBundle();
48 $bundles[] = new Sensio\Bundle\DistributionBundle\SensioDistributionBundle(); 51 $bundles[] = new Sensio\Bundle\DistributionBundle\SensioDistributionBundle();
49 $bundles[] = new Sensio\Bundle\GeneratorBundle\SensioGeneratorBundle();
50 $bundles[] = new Doctrine\Bundle\FixturesBundle\DoctrineFixturesBundle(); 52 $bundles[] = new Doctrine\Bundle\FixturesBundle\DoctrineFixturesBundle();
51 $bundles[] = new Symfony\Bundle\WebServerBundle\WebServerBundle();
52 53
53 if ('test' === $this->getEnvironment()) { 54 if ('test' === $this->getEnvironment()) {
54 $bundles[] = new DAMA\DoctrineTestBundle\DAMADoctrineTestBundle(); 55 $bundles[] = new DAMA\DoctrineTestBundle\DAMADoctrineTestBundle();
55 } 56 }
57
58 if ('dev' === $this->getEnvironment()) {
59 $bundles[] = new Sensio\Bundle\GeneratorBundle\SensioGeneratorBundle();
60 $bundles[] = new Symfony\Bundle\WebServerBundle\WebServerBundle();
61 }
56 } 62 }
57 63
58 return $bundles; 64 return $bundles;
59 } 65 }
60 66
67 public function getRootDir()
68 {
69 return __DIR__;
70 }
71
61 public function getCacheDir() 72 public function getCacheDir()
62 { 73 {
63 return dirname(__DIR__) . '/var/cache/' . $this->getEnvironment(); 74 return dirname(__DIR__) . '/var/cache/' . $this->getEnvironment();
@@ -70,7 +81,8 @@ class AppKernel extends Kernel
70 81
71 public function registerContainerConfiguration(LoaderInterface $loader) 82 public function registerContainerConfiguration(LoaderInterface $loader)
72 { 83 {
73 $loader->load($this->getProjectDir() . '/app/config/config_' . $this->getEnvironment() . '.yml'); 84 $loader->load($this->getRootDir() . '/config/config_' . $this->getEnvironment() . '.yml');
85
74 $loader->load(function ($container) { 86 $loader->load(function ($container) {
75 if ($container->getParameter('use_webpack_dev_server')) { 87 if ($container->getParameter('use_webpack_dev_server')) {
76 $container->loadFromExtension('framework', [ 88 $container->loadFromExtension('framework', [
@@ -86,5 +98,11 @@ class AppKernel extends Kernel
86 ]); 98 ]);
87 } 99 }
88 }); 100 });
101
102 $loader->load(function (ContainerBuilder $container) {
103 // $container->setParameter('container.autowiring.strict_mode', true);
104 // $container->setParameter('container.dumper.inline_class_loader', true);
105 $container->addObjectResource($this);
106 });
89 } 107 }
90} 108}
diff --git a/app/DoctrineMigrations/Version20160401000000.php b/app/DoctrineMigrations/Version20160401000000.php
index c80e3e1f..9417935b 100644
--- a/app/DoctrineMigrations/Version20160401000000.php
+++ b/app/DoctrineMigrations/Version20160401000000.php
@@ -10,9 +10,6 @@ use Wallabag\CoreBundle\Doctrine\WallabagMigration;
10 */ 10 */
11class Version20160401000000 extends WallabagMigration 11class Version20160401000000 extends WallabagMigration
12{ 12{
13 /**
14 * @param Schema $schema
15 */
16 public function up(Schema $schema) 13 public function up(Schema $schema)
17 { 14 {
18 $this->skipIf($schema->hasTable($this->getTable('entry')), 'Database already initialized'); 15 $this->skipIf($schema->hasTable($this->getTable('entry')), 'Database already initialized');
@@ -167,9 +164,6 @@ SQL
167 } 164 }
168 } 165 }
169 166
170 /**
171 * @param Schema $schema
172 */
173 public function down(Schema $schema) 167 public function down(Schema $schema)
174 { 168 {
175 $this->addSql("DROP TABLE {$this->getTable('craue_config_setting')}"); 169 $this->addSql("DROP TABLE {$this->getTable('craue_config_setting')}");
diff --git a/app/DoctrineMigrations/Version20160410190541.php b/app/DoctrineMigrations/Version20160410190541.php
index e1bd3e5c..5b6d83dc 100644
--- a/app/DoctrineMigrations/Version20160410190541.php
+++ b/app/DoctrineMigrations/Version20160410190541.php
@@ -10,9 +10,6 @@ use Wallabag\CoreBundle\Doctrine\WallabagMigration;
10 */ 10 */
11class Version20160410190541 extends WallabagMigration 11class Version20160410190541 extends WallabagMigration
12{ 12{
13 /**
14 * @param Schema $schema
15 */
16 public function up(Schema $schema) 13 public function up(Schema $schema)
17 { 14 {
18 $entryTable = $schema->getTable($this->getTable('entry')); 15 $entryTable = $schema->getTable($this->getTable('entry'));
@@ -34,9 +31,6 @@ class Version20160410190541 extends WallabagMigration
34 } 31 }
35 } 32 }
36 33
37 /**
38 * @param Schema $schema
39 */
40 public function down(Schema $schema) 34 public function down(Schema $schema)
41 { 35 {
42 $entryTable = $schema->getTable($this->getTable('entry')); 36 $entryTable = $schema->getTable($this->getTable('entry'));
diff --git a/app/DoctrineMigrations/Version20160812120952.php b/app/DoctrineMigrations/Version20160812120952.php
index d09aefa0..f5f90850 100644
--- a/app/DoctrineMigrations/Version20160812120952.php
+++ b/app/DoctrineMigrations/Version20160812120952.php
@@ -10,9 +10,6 @@ use Wallabag\CoreBundle\Doctrine\WallabagMigration;
10 */ 10 */
11class Version20160812120952 extends WallabagMigration 11class Version20160812120952 extends WallabagMigration
12{ 12{
13 /**
14 * @param Schema $schema
15 */
16 public function up(Schema $schema) 13 public function up(Schema $schema)
17 { 14 {
18 $clientsTable = $schema->getTable($this->getTable('oauth2_clients')); 15 $clientsTable = $schema->getTable($this->getTable('oauth2_clients'));
@@ -34,9 +31,6 @@ class Version20160812120952 extends WallabagMigration
34 } 31 }
35 } 32 }
36 33
37 /**
38 * @param Schema $schema
39 */
40 public function down(Schema $schema) 34 public function down(Schema $schema)
41 { 35 {
42 $clientsTable = $schema->getTable($this->getTable('oauth2_clients')); 36 $clientsTable = $schema->getTable($this->getTable('oauth2_clients'));
diff --git a/app/DoctrineMigrations/Version20160911214952.php b/app/DoctrineMigrations/Version20160911214952.php
index 9dc225fd..4d7e0f7e 100644
--- a/app/DoctrineMigrations/Version20160911214952.php
+++ b/app/DoctrineMigrations/Version20160911214952.php
@@ -10,9 +10,6 @@ use Wallabag\CoreBundle\Doctrine\WallabagMigration;
10 */ 10 */
11class Version20160911214952 extends WallabagMigration 11class Version20160911214952 extends WallabagMigration
12{ 12{
13 /**
14 * @param Schema $schema
15 */
16 public function up(Schema $schema) 13 public function up(Schema $schema)
17 { 14 {
18 $redis = $this->container 15 $redis = $this->container
@@ -36,9 +33,6 @@ class Version20160911214952 extends WallabagMigration
36 $this->skipIf(false !== $rabbitmq && false !== $redis, 'It seems that you already played this migration.'); 33 $this->skipIf(false !== $rabbitmq && false !== $redis, 'It seems that you already played this migration.');
37 } 34 }
38 35
39 /**
40 * @param Schema $schema
41 */
42 public function down(Schema $schema) 36 public function down(Schema $schema)
43 { 37 {
44 $this->addSql('DELETE FROM ' . $this->getTable('craue_config_setting') . " WHERE name = 'import_with_redis';"); 38 $this->addSql('DELETE FROM ' . $this->getTable('craue_config_setting') . " WHERE name = 'import_with_redis';");
diff --git a/app/DoctrineMigrations/Version20160916201049.php b/app/DoctrineMigrations/Version20160916201049.php
index 13f99ce1..fc5e04ae 100644
--- a/app/DoctrineMigrations/Version20160916201049.php
+++ b/app/DoctrineMigrations/Version20160916201049.php
@@ -10,9 +10,6 @@ use Wallabag\CoreBundle\Doctrine\WallabagMigration;
10 */ 10 */
11class Version20160916201049 extends WallabagMigration 11class Version20160916201049 extends WallabagMigration
12{ 12{
13 /**
14 * @param Schema $schema
15 */
16 public function up(Schema $schema) 13 public function up(Schema $schema)
17 { 14 {
18 $configTable = $schema->getTable($this->getTable('config')); 15 $configTable = $schema->getTable($this->getTable('config'));
@@ -23,9 +20,6 @@ class Version20160916201049 extends WallabagMigration
23 $this->addSql('DELETE FROM ' . $this->getTable('craue_config_setting') . " WHERE name = 'pocket_consumer_key';"); 20 $this->addSql('DELETE FROM ' . $this->getTable('craue_config_setting') . " WHERE name = 'pocket_consumer_key';");
24 } 21 }
25 22
26 /**
27 * @param Schema $schema
28 */
29 public function down(Schema $schema) 23 public function down(Schema $schema)
30 { 24 {
31 $configTable = $schema->getTable($this->getTable('config')); 25 $configTable = $schema->getTable($this->getTable('config'));
diff --git a/app/DoctrineMigrations/Version20161001072726.php b/app/DoctrineMigrations/Version20161001072726.php
index 4e19a54a..497cb2a1 100644
--- a/app/DoctrineMigrations/Version20161001072726.php
+++ b/app/DoctrineMigrations/Version20161001072726.php
@@ -11,9 +11,6 @@ use Wallabag\CoreBundle\Doctrine\WallabagMigration;
11 */ 11 */
12class Version20161001072726 extends WallabagMigration 12class Version20161001072726 extends WallabagMigration
13{ 13{
14 /**
15 * @param Schema $schema
16 */
17 public function up(Schema $schema) 14 public function up(Schema $schema)
18 { 15 {
19 $this->skipIf('sqlite' === $this->connection->getDatabasePlatform()->getName(), 'Migration can only be executed safely on \'mysql\' or \'postgresql\'.'); 16 $this->skipIf('sqlite' === $this->connection->getDatabasePlatform()->getName(), 'Migration can only be executed safely on \'mysql\' or \'postgresql\'.');
@@ -98,9 +95,6 @@ class Version20161001072726 extends WallabagMigration
98 $this->addSql('ALTER TABLE ' . $this->getTable('annotation') . ' ADD CONSTRAINT FK_annotation_entry FOREIGN KEY (entry_id) REFERENCES ' . $this->getTable('entry') . ' (id) ON DELETE CASCADE'); 95 $this->addSql('ALTER TABLE ' . $this->getTable('annotation') . ' ADD CONSTRAINT FK_annotation_entry FOREIGN KEY (entry_id) REFERENCES ' . $this->getTable('entry') . ' (id) ON DELETE CASCADE');
99 } 96 }
100 97
101 /**
102 * @param Schema $schema
103 */
104 public function down(Schema $schema) 98 public function down(Schema $schema)
105 { 99 {
106 throw new SkipMigrationException('Too complex ...'); 100 throw new SkipMigrationException('Too complex ...');
diff --git a/app/DoctrineMigrations/Version20161022134138.php b/app/DoctrineMigrations/Version20161022134138.php
index 231aada7..d993363c 100644
--- a/app/DoctrineMigrations/Version20161022134138.php
+++ b/app/DoctrineMigrations/Version20161022134138.php
@@ -10,9 +10,6 @@ use Wallabag\CoreBundle\Doctrine\WallabagMigration;
10 */ 10 */
11class Version20161022134138 extends WallabagMigration 11class Version20161022134138 extends WallabagMigration
12{ 12{
13 /**
14 * @param Schema $schema
15 */
16 public function up(Schema $schema) 13 public function up(Schema $schema)
17 { 14 {
18 $this->skipIf('mysql' !== $this->connection->getDatabasePlatform()->getName(), 'This migration only apply to MySQL'); 15 $this->skipIf('mysql' !== $this->connection->getDatabasePlatform()->getName(), 'This migration only apply to MySQL');
@@ -41,9 +38,6 @@ class Version20161022134138 extends WallabagMigration
41 $this->addSql('ALTER TABLE ' . $this->getTable('user') . ' CHANGE `name` `name` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;'); 38 $this->addSql('ALTER TABLE ' . $this->getTable('user') . ' CHANGE `name` `name` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;');
42 } 39 }
43 40
44 /**
45 * @param Schema $schema
46 */
47 public function down(Schema $schema) 41 public function down(Schema $schema)
48 { 42 {
49 $this->skipIf('mysql' !== $this->connection->getDatabasePlatform()->getName(), 'This migration only apply to MySQL'); 43 $this->skipIf('mysql' !== $this->connection->getDatabasePlatform()->getName(), 'This migration only apply to MySQL');
diff --git a/app/DoctrineMigrations/Version20161024212538.php b/app/DoctrineMigrations/Version20161024212538.php
index a7e3c3c8..fa028ac0 100644
--- a/app/DoctrineMigrations/Version20161024212538.php
+++ b/app/DoctrineMigrations/Version20161024212538.php
@@ -12,9 +12,6 @@ class Version20161024212538 extends WallabagMigration
12{ 12{
13 private $constraintName = 'IDX_user_oauth_client'; 13 private $constraintName = 'IDX_user_oauth_client';
14 14
15 /**
16 * @param Schema $schema
17 */
18 public function up(Schema $schema) 15 public function up(Schema $schema)
19 { 16 {
20 $clientsTable = $schema->getTable($this->getTable('oauth2_clients')); 17 $clientsTable = $schema->getTable($this->getTable('oauth2_clients'));
@@ -32,9 +29,6 @@ class Version20161024212538 extends WallabagMigration
32 ); 29 );
33 } 30 }
34 31
35 /**
36 * @param Schema $schema
37 */
38 public function down(Schema $schema) 32 public function down(Schema $schema)
39 { 33 {
40 $clientsTable = $schema->getTable($this->getTable('oauth2_clients')); 34 $clientsTable = $schema->getTable($this->getTable('oauth2_clients'));
diff --git a/app/DoctrineMigrations/Version20161031132655.php b/app/DoctrineMigrations/Version20161031132655.php
index 8d576862..ec58cb2a 100644
--- a/app/DoctrineMigrations/Version20161031132655.php
+++ b/app/DoctrineMigrations/Version20161031132655.php
@@ -10,9 +10,6 @@ use Wallabag\CoreBundle\Doctrine\WallabagMigration;
10 */ 10 */
11class Version20161031132655 extends WallabagMigration 11class Version20161031132655 extends WallabagMigration
12{ 12{
13 /**
14 * @param Schema $schema
15 */
16 public function up(Schema $schema) 13 public function up(Schema $schema)
17 { 14 {
18 $images = $this->container 15 $images = $this->container
@@ -25,9 +22,6 @@ class Version20161031132655 extends WallabagMigration
25 $this->addSql('INSERT INTO ' . $this->getTable('craue_config_setting') . " (name, value, section) VALUES ('download_images_enabled', 0, 'misc')"); 22 $this->addSql('INSERT INTO ' . $this->getTable('craue_config_setting') . " (name, value, section) VALUES ('download_images_enabled', 0, 'misc')");
26 } 23 }
27 24
28 /**
29 * @param Schema $schema
30 */
31 public function down(Schema $schema) 25 public function down(Schema $schema)
32 { 26 {
33 $this->addSql('DELETE FROM ' . $this->getTable('craue_config_setting') . " WHERE name = 'download_images_enabled';"); 27 $this->addSql('DELETE FROM ' . $this->getTable('craue_config_setting') . " WHERE name = 'download_images_enabled';");
diff --git a/app/DoctrineMigrations/Version20161104073720.php b/app/DoctrineMigrations/Version20161104073720.php
index e2b18a46..e0289ec9 100644
--- a/app/DoctrineMigrations/Version20161104073720.php
+++ b/app/DoctrineMigrations/Version20161104073720.php
@@ -12,9 +12,6 @@ class Version20161104073720 extends WallabagMigration
12{ 12{
13 private $indexName = 'IDX_entry_created_at'; 13 private $indexName = 'IDX_entry_created_at';
14 14
15 /**
16 * @param Schema $schema
17 */
18 public function up(Schema $schema) 15 public function up(Schema $schema)
19 { 16 {
20 $entryTable = $schema->getTable($this->getTable('entry')); 17 $entryTable = $schema->getTable($this->getTable('entry'));
@@ -23,9 +20,6 @@ class Version20161104073720 extends WallabagMigration
23 $entryTable->addIndex(['created_at'], $this->indexName); 20 $entryTable->addIndex(['created_at'], $this->indexName);
24 } 21 }
25 22
26 /**
27 * @param Schema $schema
28 */
29 public function down(Schema $schema) 23 public function down(Schema $schema)
30 { 24 {
31 $entryTable = $schema->getTable($this->getTable('entry')); 25 $entryTable = $schema->getTable($this->getTable('entry'));
diff --git a/app/DoctrineMigrations/Version20161106113822.php b/app/DoctrineMigrations/Version20161106113822.php
index 3a3c90db..5a4831f4 100644
--- a/app/DoctrineMigrations/Version20161106113822.php
+++ b/app/DoctrineMigrations/Version20161106113822.php
@@ -10,9 +10,6 @@ use Wallabag\CoreBundle\Doctrine\WallabagMigration;
10 */ 10 */
11class Version20161106113822 extends WallabagMigration 11class Version20161106113822 extends WallabagMigration
12{ 12{
13 /**
14 * @param Schema $schema
15 */
16 public function up(Schema $schema) 13 public function up(Schema $schema)
17 { 14 {
18 $configTable = $schema->getTable($this->getTable('config')); 15 $configTable = $schema->getTable($this->getTable('config'));
@@ -25,9 +22,6 @@ class Version20161106113822 extends WallabagMigration
25 ]); 22 ]);
26 } 23 }
27 24
28 /**
29 * @param Schema $schema
30 */
31 public function down(Schema $schema) 25 public function down(Schema $schema)
32 { 26 {
33 $configTable = $schema->getTable($this->getTable('config')); 27 $configTable = $schema->getTable($this->getTable('config'));
diff --git a/app/DoctrineMigrations/Version20161117071626.php b/app/DoctrineMigrations/Version20161117071626.php
index fc66e7e3..bafb70da 100644
--- a/app/DoctrineMigrations/Version20161117071626.php
+++ b/app/DoctrineMigrations/Version20161117071626.php
@@ -10,9 +10,6 @@ use Wallabag\CoreBundle\Doctrine\WallabagMigration;
10 */ 10 */
11class Version20161117071626 extends WallabagMigration 11class Version20161117071626 extends WallabagMigration
12{ 12{
13 /**
14 * @param Schema $schema
15 */
16 public function up(Schema $schema) 13 public function up(Schema $schema)
17 { 14 {
18 $share = $this->container 15 $share = $this->container
@@ -36,9 +33,6 @@ class Version20161117071626 extends WallabagMigration
36 $this->skipIf(false !== $share && false !== $unmark, 'It seems that you already played this migration.'); 33 $this->skipIf(false !== $share && false !== $unmark, 'It seems that you already played this migration.');
37 } 34 }
38 35
39 /**
40 * @param Schema $schema
41 */
42 public function down(Schema $schema) 36 public function down(Schema $schema)
43 { 37 {
44 $this->addSql('DELETE FROM ' . $this->getTable('craue_config_setting') . " WHERE name = 'share_unmark';"); 38 $this->addSql('DELETE FROM ' . $this->getTable('craue_config_setting') . " WHERE name = 'share_unmark';");
diff --git a/app/DoctrineMigrations/Version20161118134328.php b/app/DoctrineMigrations/Version20161118134328.php
index 8302408e..2298447a 100644
--- a/app/DoctrineMigrations/Version20161118134328.php
+++ b/app/DoctrineMigrations/Version20161118134328.php
@@ -10,9 +10,6 @@ use Wallabag\CoreBundle\Doctrine\WallabagMigration;
10 */ 10 */
11class Version20161118134328 extends WallabagMigration 11class Version20161118134328 extends WallabagMigration
12{ 12{
13 /**
14 * @param Schema $schema
15 */
16 public function up(Schema $schema) 13 public function up(Schema $schema)
17 { 14 {
18 $entryTable = $schema->getTable($this->getTable('entry')); 15 $entryTable = $schema->getTable($this->getTable('entry'));
@@ -25,9 +22,6 @@ class Version20161118134328 extends WallabagMigration
25 ]); 22 ]);
26 } 23 }
27 24
28 /**
29 * @param Schema $schema
30 */
31 public function down(Schema $schema) 25 public function down(Schema $schema)
32 { 26 {
33 $entryTable = $schema->getTable($this->getTable('entry')); 27 $entryTable = $schema->getTable($this->getTable('entry'));
diff --git a/app/DoctrineMigrations/Version20161122144743.php b/app/DoctrineMigrations/Version20161122144743.php
index 08a41f48..e628f058 100644
--- a/app/DoctrineMigrations/Version20161122144743.php
+++ b/app/DoctrineMigrations/Version20161122144743.php
@@ -10,9 +10,6 @@ use Wallabag\CoreBundle\Doctrine\WallabagMigration;
10 */ 10 */
11class Version20161122144743 extends WallabagMigration 11class Version20161122144743 extends WallabagMigration
12{ 12{
13 /**
14 * @param Schema $schema
15 */
16 public function up(Schema $schema) 13 public function up(Schema $schema)
17 { 14 {
18 $access = $this->container 15 $access = $this->container
@@ -25,9 +22,6 @@ class Version20161122144743 extends WallabagMigration
25 $this->addSql('INSERT INTO ' . $this->getTable('craue_config_setting') . " (name, value, section) VALUES ('restricted_access', 0, 'entry')"); 22 $this->addSql('INSERT INTO ' . $this->getTable('craue_config_setting') . " (name, value, section) VALUES ('restricted_access', 0, 'entry')");
26 } 23 }
27 24
28 /**
29 * @param Schema $schema
30 */
31 public function down(Schema $schema) 25 public function down(Schema $schema)
32 { 26 {
33 $this->addSql('DELETE FROM ' . $this->getTable('craue_config_setting') . " WHERE name = 'restricted_access';"); 27 $this->addSql('DELETE FROM ' . $this->getTable('craue_config_setting') . " WHERE name = 'restricted_access';");
diff --git a/app/DoctrineMigrations/Version20161122203647.php b/app/DoctrineMigrations/Version20161122203647.php
index 60ddeb08..27fe7d2c 100644
--- a/app/DoctrineMigrations/Version20161122203647.php
+++ b/app/DoctrineMigrations/Version20161122203647.php
@@ -18,9 +18,6 @@ use Wallabag\CoreBundle\Doctrine\WallabagMigration;
18 */ 18 */
19class Version20161122203647 extends WallabagMigration 19class Version20161122203647 extends WallabagMigration
20{ 20{
21 /**
22 * @param Schema $schema
23 */
24 public function up(Schema $schema) 21 public function up(Schema $schema)
25 { 22 {
26 $userTable = $schema->getTable($this->getTable('user')); 23 $userTable = $schema->getTable($this->getTable('user'));
@@ -31,9 +28,6 @@ class Version20161122203647 extends WallabagMigration
31 $userTable->dropColumn('credentials_expired'); 28 $userTable->dropColumn('credentials_expired');
32 } 29 }
33 30
34 /**
35 * @param Schema $schema
36 */
37 public function down(Schema $schema) 31 public function down(Schema $schema)
38 { 32 {
39 $userTable = $schema->getTable($this->getTable('user')); 33 $userTable = $schema->getTable($this->getTable('user'));
diff --git a/app/DoctrineMigrations/Version20161128084725.php b/app/DoctrineMigrations/Version20161128084725.php
index ef747154..e22e842f 100644
--- a/app/DoctrineMigrations/Version20161128084725.php
+++ b/app/DoctrineMigrations/Version20161128084725.php
@@ -10,9 +10,6 @@ use Wallabag\CoreBundle\Doctrine\WallabagMigration;
10 */ 10 */
11class Version20161128084725 extends WallabagMigration 11class Version20161128084725 extends WallabagMigration
12{ 12{
13 /**
14 * @param Schema $schema
15 */
16 public function up(Schema $schema) 13 public function up(Schema $schema)
17 { 14 {
18 $configTable = $schema->getTable($this->getTable('config')); 15 $configTable = $schema->getTable($this->getTable('config'));
@@ -21,9 +18,6 @@ class Version20161128084725 extends WallabagMigration
21 $configTable->addColumn('list_mode', 'integer', ['notnull' => false]); 18 $configTable->addColumn('list_mode', 'integer', ['notnull' => false]);
22 } 19 }
23 20
24 /**
25 * @param Schema $schema
26 */
27 public function down(Schema $schema) 21 public function down(Schema $schema)
28 { 22 {
29 $configTable = $schema->getTable($this->getTable('config')); 23 $configTable = $schema->getTable($this->getTable('config'));
diff --git a/app/DoctrineMigrations/Version20161128131503.php b/app/DoctrineMigrations/Version20161128131503.php
index cd434617..2a34d448 100644
--- a/app/DoctrineMigrations/Version20161128131503.php
+++ b/app/DoctrineMigrations/Version20161128131503.php
@@ -16,9 +16,6 @@ class Version20161128131503 extends WallabagMigration
16 'expires_at' => 'datetime', 16 'expires_at' => 'datetime',
17 ]; 17 ];
18 18
19 /**
20 * @param Schema $schema
21 */
22 public function up(Schema $schema) 19 public function up(Schema $schema)
23 { 20 {
24 $userTable = $schema->getTable($this->getTable('user')); 21 $userTable = $schema->getTable($this->getTable('user'));
@@ -29,9 +26,6 @@ class Version20161128131503 extends WallabagMigration
29 } 26 }
30 } 27 }
31 28
32 /**
33 * @param Schema $schema
34 */
35 public function down(Schema $schema) 29 public function down(Schema $schema)
36 { 30 {
37 $userTable = $schema->getTable($this->getTable('user')); 31 $userTable = $schema->getTable($this->getTable('user'));
diff --git a/app/DoctrineMigrations/Version20161214094402.php b/app/DoctrineMigrations/Version20161214094402.php
index e9f1a302..0240f599 100644
--- a/app/DoctrineMigrations/Version20161214094402.php
+++ b/app/DoctrineMigrations/Version20161214094402.php
@@ -10,9 +10,6 @@ use Wallabag\CoreBundle\Doctrine\WallabagMigration;
10 */ 10 */
11class Version20161214094402 extends WallabagMigration 11class Version20161214094402 extends WallabagMigration
12{ 12{
13 /**
14 * @param Schema $schema
15 */
16 public function up(Schema $schema) 13 public function up(Schema $schema)
17 { 14 {
18 $entryTable = $schema->getTable($this->getTable('entry')); 15 $entryTable = $schema->getTable($this->getTable('entry'));
@@ -35,9 +32,6 @@ class Version20161214094402 extends WallabagMigration
35 } 32 }
36 } 33 }
37 34
38 /**
39 * @param Schema $schema
40 */
41 public function down(Schema $schema) 35 public function down(Schema $schema)
42 { 36 {
43 $entryTable = $schema->getTable($this->getTable('entry')); 37 $entryTable = $schema->getTable($this->getTable('entry'));
diff --git a/app/DoctrineMigrations/Version20161214094403.php b/app/DoctrineMigrations/Version20161214094403.php
index 1f9e1f6b..c6003cb3 100644
--- a/app/DoctrineMigrations/Version20161214094403.php
+++ b/app/DoctrineMigrations/Version20161214094403.php
@@ -12,9 +12,6 @@ class Version20161214094403 extends WallabagMigration
12{ 12{
13 private $indexName = 'IDX_entry_uid'; 13 private $indexName = 'IDX_entry_uid';
14 14
15 /**
16 * @param Schema $schema
17 */
18 public function up(Schema $schema) 15 public function up(Schema $schema)
19 { 16 {
20 $entryTable = $schema->getTable($this->getTable('entry')); 17 $entryTable = $schema->getTable($this->getTable('entry'));
@@ -23,9 +20,6 @@ class Version20161214094403 extends WallabagMigration
23 $entryTable->addIndex(['uid'], $this->indexName); 20 $entryTable->addIndex(['uid'], $this->indexName);
24 } 21 }
25 22
26 /**
27 * @param Schema $schema
28 */
29 public function down(Schema $schema) 23 public function down(Schema $schema)
30 { 24 {
31 $entryTable = $schema->getTable($this->getTable('entry')); 25 $entryTable = $schema->getTable($this->getTable('entry'));
diff --git a/app/DoctrineMigrations/Version20170127093841.php b/app/DoctrineMigrations/Version20170127093841.php
index 491b9383..d8eb34e5 100644
--- a/app/DoctrineMigrations/Version20170127093841.php
+++ b/app/DoctrineMigrations/Version20170127093841.php
@@ -13,9 +13,6 @@ class Version20170127093841 extends WallabagMigration
13 private $indexStarredName = 'IDX_entry_starred'; 13 private $indexStarredName = 'IDX_entry_starred';
14 private $indexArchivedName = 'IDX_entry_archived'; 14 private $indexArchivedName = 'IDX_entry_archived';
15 15
16 /**
17 * @param Schema $schema
18 */
19 public function up(Schema $schema) 16 public function up(Schema $schema)
20 { 17 {
21 $entryTable = $schema->getTable($this->getTable('entry')); 18 $entryTable = $schema->getTable($this->getTable('entry'));
@@ -25,9 +22,6 @@ class Version20170127093841 extends WallabagMigration
25 $entryTable->addIndex(['is_archived'], $this->indexArchivedName); 22 $entryTable->addIndex(['is_archived'], $this->indexArchivedName);
26 } 23 }
27 24
28 /**
29 * @param Schema $schema
30 */
31 public function down(Schema $schema) 25 public function down(Schema $schema)
32 { 26 {
33 $entryTable = $schema->getTable($this->getTable('entry')); 27 $entryTable = $schema->getTable($this->getTable('entry'));
diff --git a/app/DoctrineMigrations/Version20170327194233.php b/app/DoctrineMigrations/Version20170327194233.php
index 1aa20eb5..268f8cde 100644
--- a/app/DoctrineMigrations/Version20170327194233.php
+++ b/app/DoctrineMigrations/Version20170327194233.php
@@ -10,9 +10,6 @@ use Wallabag\CoreBundle\Doctrine\WallabagMigration;
10 */ 10 */
11class Version20170327194233 extends WallabagMigration 11class Version20170327194233 extends WallabagMigration
12{ 12{
13 /**
14 * @param Schema $schema
15 */
16 public function up(Schema $schema) 13 public function up(Schema $schema)
17 { 14 {
18 $scuttle = $this->container 15 $scuttle = $this->container
@@ -26,9 +23,6 @@ class Version20170327194233 extends WallabagMigration
26 $this->addSql('INSERT INTO ' . $this->getTable('craue_config_setting') . " (name, value, section) VALUES ('scuttle_url', 'http://scuttle.org', 'entry')"); 23 $this->addSql('INSERT INTO ' . $this->getTable('craue_config_setting') . " (name, value, section) VALUES ('scuttle_url', 'http://scuttle.org', 'entry')");
27 } 24 }
28 25
29 /**
30 * @param Schema $schema
31 */
32 public function down(Schema $schema) 26 public function down(Schema $schema)
33 { 27 {
34 $this->addSql('DELETE FROM ' . $this->getTable('craue_config_setting') . " WHERE name = 'share_scuttle';"); 28 $this->addSql('DELETE FROM ' . $this->getTable('craue_config_setting') . " WHERE name = 'share_scuttle';");
diff --git a/app/DoctrineMigrations/Version20170405182620.php b/app/DoctrineMigrations/Version20170405182620.php
index c7752664..798c72af 100644
--- a/app/DoctrineMigrations/Version20170405182620.php
+++ b/app/DoctrineMigrations/Version20170405182620.php
@@ -10,9 +10,6 @@ use Wallabag\CoreBundle\Doctrine\WallabagMigration;
10 */ 10 */
11class Version20170405182620 extends WallabagMigration 11class Version20170405182620 extends WallabagMigration
12{ 12{
13 /**
14 * @param Schema $schema
15 */
16 public function up(Schema $schema) 13 public function up(Schema $schema)
17 { 14 {
18 $entryTable = $schema->getTable($this->getTable('entry')); 15 $entryTable = $schema->getTable($this->getTable('entry'));
@@ -30,9 +27,6 @@ class Version20170405182620 extends WallabagMigration
30 ]); 27 ]);
31 } 28 }
32 29
33 /**
34 * @param Schema $schema
35 */
36 public function down(Schema $schema) 30 public function down(Schema $schema)
37 { 31 {
38 $entryTable = $schema->getTable($this->getTable('entry')); 32 $entryTable = $schema->getTable($this->getTable('entry'));
diff --git a/app/DoctrineMigrations/Version20170407200919.php b/app/DoctrineMigrations/Version20170407200919.php
index ad05eadf..d9fff6c3 100644
--- a/app/DoctrineMigrations/Version20170407200919.php
+++ b/app/DoctrineMigrations/Version20170407200919.php
@@ -10,9 +10,6 @@ use Wallabag\CoreBundle\Doctrine\WallabagMigration;
10 */ 10 */
11class Version20170407200919 extends WallabagMigration 11class Version20170407200919 extends WallabagMigration
12{ 12{
13 /**
14 * @param Schema $schema
15 */
16 public function up(Schema $schema) 13 public function up(Schema $schema)
17 { 14 {
18 $entryTable = $schema->getTable($this->getTable('entry')); 15 $entryTable = $schema->getTable($this->getTable('entry'));
@@ -21,9 +18,6 @@ class Version20170407200919 extends WallabagMigration
21 $entryTable->dropColumn('is_public'); 18 $entryTable->dropColumn('is_public');
22 } 19 }
23 20
24 /**
25 * @param Schema $schema
26 */
27 public function down(Schema $schema) 21 public function down(Schema $schema)
28 { 22 {
29 $entryTable = $schema->getTable($this->getTable('entry')); 23 $entryTable = $schema->getTable($this->getTable('entry'));
diff --git a/app/DoctrineMigrations/Version20170420134133.php b/app/DoctrineMigrations/Version20170420134133.php
index c1732578..2bf05346 100644
--- a/app/DoctrineMigrations/Version20170420134133.php
+++ b/app/DoctrineMigrations/Version20170420134133.php
@@ -10,17 +10,11 @@ use Wallabag\CoreBundle\Doctrine\WallabagMigration;
10 */ 10 */
11class Version20170420134133 extends WallabagMigration 11class Version20170420134133 extends WallabagMigration
12{ 12{
13 /**
14 * @param Schema $schema
15 */
16 public function up(Schema $schema) 13 public function up(Schema $schema)
17 { 14 {
18 $this->addSql('DELETE FROM ' . $this->getTable('craue_config_setting') . " WHERE name = 'download_pictures';"); 15 $this->addSql('DELETE FROM ' . $this->getTable('craue_config_setting') . " WHERE name = 'download_pictures';");
19 } 16 }
20 17
21 /**
22 * @param Schema $schema
23 */
24 public function down(Schema $schema) 18 public function down(Schema $schema)
25 { 19 {
26 $downloadPictures = $this->container 20 $downloadPictures = $this->container
diff --git a/app/DoctrineMigrations/Version20170501115751.php b/app/DoctrineMigrations/Version20170501115751.php
index fd238cef..a879cd44 100644
--- a/app/DoctrineMigrations/Version20170501115751.php
+++ b/app/DoctrineMigrations/Version20170501115751.php
@@ -10,9 +10,6 @@ use Wallabag\CoreBundle\Doctrine\WallabagMigration;
10 */ 10 */
11class Version20170501115751 extends WallabagMigration 11class Version20170501115751 extends WallabagMigration
12{ 12{
13 /**
14 * @param Schema $schema
15 */
16 public function up(Schema $schema) 13 public function up(Schema $schema)
17 { 14 {
18 $this->skipIf($schema->hasTable($this->getTable('site_credential')), 'It seems that you already played this migration.'); 15 $this->skipIf($schema->hasTable($this->getTable('site_credential')), 'It seems that you already played this migration.');
@@ -34,9 +31,6 @@ class Version20170501115751 extends WallabagMigration
34 } 31 }
35 } 32 }
36 33
37 /**
38 * @param Schema $schema
39 */
40 public function down(Schema $schema) 34 public function down(Schema $schema)
41 { 35 {
42 $schema->dropTable($this->getTable('site_credential')); 36 $schema->dropTable($this->getTable('site_credential'));
diff --git a/app/DoctrineMigrations/Version20170510082609.php b/app/DoctrineMigrations/Version20170510082609.php
index 541ae1fd..ddc894a6 100644
--- a/app/DoctrineMigrations/Version20170510082609.php
+++ b/app/DoctrineMigrations/Version20170510082609.php
@@ -17,9 +17,6 @@ class Version20170510082609 extends WallabagMigration
17 'email_canonical', 17 'email_canonical',
18 ]; 18 ];
19 19
20 /**
21 * @param Schema $schema
22 */
23 public function up(Schema $schema) 20 public function up(Schema $schema)
24 { 21 {
25 $this->skipIf('mysql' !== $this->connection->getDatabasePlatform()->getName(), 'This migration only apply to MySQL'); 22 $this->skipIf('mysql' !== $this->connection->getDatabasePlatform()->getName(), 'This migration only apply to MySQL');
@@ -29,9 +26,6 @@ class Version20170510082609 extends WallabagMigration
29 } 26 }
30 } 27 }
31 28
32 /**
33 * @param Schema $schema
34 */
35 public function down(Schema $schema) 29 public function down(Schema $schema)
36 { 30 {
37 $this->skipIf('mysql' !== $this->connection->getDatabasePlatform()->getName(), 'This migration only apply to MySQL'); 31 $this->skipIf('mysql' !== $this->connection->getDatabasePlatform()->getName(), 'This migration only apply to MySQL');
diff --git a/app/DoctrineMigrations/Version20170511115400.php b/app/DoctrineMigrations/Version20170511115400.php
index cb80dd45..9a89cfb8 100644
--- a/app/DoctrineMigrations/Version20170511115400.php
+++ b/app/DoctrineMigrations/Version20170511115400.php
@@ -10,9 +10,6 @@ use Wallabag\CoreBundle\Doctrine\WallabagMigration;
10 */ 10 */
11class Version20170511115400 extends WallabagMigration 11class Version20170511115400 extends WallabagMigration
12{ 12{
13 /**
14 * @param Schema $schema
15 */
16 public function up(Schema $schema) 13 public function up(Schema $schema)
17 { 14 {
18 $entryTable = $schema->getTable($this->getTable('entry')); 15 $entryTable = $schema->getTable($this->getTable('entry'));
@@ -24,9 +21,6 @@ class Version20170511115400 extends WallabagMigration
24 ]); 21 ]);
25 } 22 }
26 23
27 /**
28 * @param Schema $schema
29 */
30 public function down(Schema $schema) 24 public function down(Schema $schema)
31 { 25 {
32 $entryTable = $schema->getTable($this->getTable('entry')); 26 $entryTable = $schema->getTable($this->getTable('entry'));
diff --git a/app/DoctrineMigrations/Version20170511211659.php b/app/DoctrineMigrations/Version20170511211659.php
index 00ce7b1f..d0752baf 100644
--- a/app/DoctrineMigrations/Version20170511211659.php
+++ b/app/DoctrineMigrations/Version20170511211659.php
@@ -13,19 +13,21 @@ class Version20170511211659 extends WallabagMigration
13{ 13{
14 public function up(Schema $schema) 14 public function up(Schema $schema)
15 { 15 {
16 $tableName = $this->getTable('annotation');
17
18 switch ($this->connection->getDatabasePlatform()->getName()) { 16 switch ($this->connection->getDatabasePlatform()->getName()) {
19 case 'sqlite': 17 case 'sqlite':
18 $annotationTableName = $this->getTable('annotation', true);
19 $userTableName = $this->getTable('user', true);
20 $entryTableName = $this->getTable('entry', true);
21
20 $this->addSql(<<<EOD 22 $this->addSql(<<<EOD
21CREATE TEMPORARY TABLE __temp__wallabag_annotation AS 23CREATE TEMPORARY TABLE __temp__wallabag_annotation AS
22 SELECT id, user_id, entry_id, text, created_at, updated_at, quote, ranges 24 SELECT id, user_id, entry_id, text, created_at, updated_at, quote, ranges
23 FROM ${tableName} 25 FROM ${annotationTableName}
24EOD 26EOD
25 ); 27 );
26 $this->addSql('DROP TABLE ' . $tableName); 28 $this->addSql('DROP TABLE ' . $annotationTableName);
27 $this->addSql(<<<EOD 29 $this->addSql(<<<EOD
28CREATE TABLE ${tableName} 30CREATE TABLE ${annotationTableName}
29( 31(
30 id INTEGER PRIMARY KEY NOT NULL, 32 id INTEGER PRIMARY KEY NOT NULL,
31 user_id INTEGER DEFAULT NULL, 33 user_id INTEGER DEFAULT NULL,
@@ -35,16 +37,16 @@ CREATE TABLE ${tableName}
35 updated_at DATETIME NOT NULL, 37 updated_at DATETIME NOT NULL,
36 quote CLOB NOT NULL, 38 quote CLOB NOT NULL,
37 ranges CLOB NOT NULL, 39 ranges CLOB NOT NULL,
38 CONSTRAINT FK_A7AED006A76ED395 FOREIGN KEY (user_id) REFERENCES wallabag_user (id), 40 CONSTRAINT FK_A7AED006A76ED395 FOREIGN KEY (user_id) REFERENCES ${userTableName} (id),
39 CONSTRAINT FK_A7AED006BA364942 FOREIGN KEY (entry_id) REFERENCES wallabag_entry (id) ON DELETE CASCADE 41 CONSTRAINT FK_A7AED006BA364942 FOREIGN KEY (entry_id) REFERENCES ${entryTableName} (id) ON DELETE CASCADE
40); 42);
41CREATE INDEX IDX_A7AED006A76ED395 ON wallabag_annotation (user_id); 43CREATE INDEX IDX_A7AED006A76ED395 ON ${annotationTableName} (user_id);
42CREATE INDEX IDX_A7AED006BA364942 ON wallabag_annotation (entry_id); 44CREATE INDEX IDX_A7AED006BA364942 ON ${annotationTableName} (entry_id);
43EOD 45EOD
44 ); 46 );
45 47
46 $this->addSql(<<<EOD 48 $this->addSql(<<<EOD
47INSERT INTO ${tableName} (id, user_id, entry_id, text, created_at, updated_at, quote, ranges) 49INSERT INTO ${annotationTableName} (id, user_id, entry_id, text, created_at, updated_at, quote, ranges)
48SELECT id, user_id, entry_id, text, created_at, updated_at, quote, ranges 50SELECT id, user_id, entry_id, text, created_at, updated_at, quote, ranges
49FROM __temp__wallabag_annotation; 51FROM __temp__wallabag_annotation;
50EOD 52EOD
@@ -52,10 +54,10 @@ EOD
52 $this->addSql('DROP TABLE __temp__wallabag_annotation'); 54 $this->addSql('DROP TABLE __temp__wallabag_annotation');
53 break; 55 break;
54 case 'mysql': 56 case 'mysql':
55 $this->addSql('ALTER TABLE ' . $tableName . ' MODIFY quote TEXT NOT NULL'); 57 $this->addSql('ALTER TABLE ' . $this->getTable('annotation') . ' MODIFY quote TEXT NOT NULL');
56 break; 58 break;
57 case 'postgresql': 59 case 'postgresql':
58 $this->addSql('ALTER TABLE ' . $tableName . ' ALTER COLUMN quote TYPE TEXT'); 60 $this->addSql('ALTER TABLE ' . $this->getTable('annotation') . ' ALTER COLUMN quote TYPE TEXT');
59 break; 61 break;
60 } 62 }
61 } 63 }
diff --git a/app/DoctrineMigrations/Version20170602075214.php b/app/DoctrineMigrations/Version20170602075214.php
index 12997c71..f72839b2 100644
--- a/app/DoctrineMigrations/Version20170602075214.php
+++ b/app/DoctrineMigrations/Version20170602075214.php
@@ -10,9 +10,6 @@ use Wallabag\CoreBundle\Doctrine\WallabagMigration;
10 */ 10 */
11class Version20170602075214 extends WallabagMigration 11class Version20170602075214 extends WallabagMigration
12{ 12{
13 /**
14 * @param Schema $schema
15 */
16 public function up(Schema $schema) 13 public function up(Schema $schema)
17 { 14 {
18 $apiUserRegistration = $this->container 15 $apiUserRegistration = $this->container
@@ -25,9 +22,6 @@ class Version20170602075214 extends WallabagMigration
25 $this->addSql('INSERT INTO ' . $this->getTable('craue_config_setting') . " (name, value, section) VALUES ('api_user_registration', '0', 'api')"); 22 $this->addSql('INSERT INTO ' . $this->getTable('craue_config_setting') . " (name, value, section) VALUES ('api_user_registration', '0', 'api')");
26 } 23 }
27 24
28 /**
29 * @param Schema $schema
30 */
31 public function down(Schema $schema) 25 public function down(Schema $schema)
32 { 26 {
33 $this->addSql('DELETE FROM ' . $this->getTable('craue_config_setting') . " WHERE name = 'api_user_registration';"); 27 $this->addSql('DELETE FROM ' . $this->getTable('craue_config_setting') . " WHERE name = 'api_user_registration';");
diff --git a/app/DoctrineMigrations/Version20170606155640.php b/app/DoctrineMigrations/Version20170606155640.php
index 153d31b8..099e5329 100644
--- a/app/DoctrineMigrations/Version20170606155640.php
+++ b/app/DoctrineMigrations/Version20170606155640.php
@@ -11,9 +11,6 @@ use Wallabag\CoreBundle\Doctrine\WallabagMigration;
11 */ 11 */
12class Version20170606155640 extends WallabagMigration 12class Version20170606155640 extends WallabagMigration
13{ 13{
14 /**
15 * @param Schema $schema
16 */
17 public function up(Schema $schema) 14 public function up(Schema $schema)
18 { 15 {
19 $apiUserRegistration = $this->container 16 $apiUserRegistration = $this->container
@@ -26,9 +23,6 @@ class Version20170606155640 extends WallabagMigration
26 $this->addSql('DELETE FROM ' . $this->getTable('craue_config_setting') . " WHERE name = 'wallabag_url'"); 23 $this->addSql('DELETE FROM ' . $this->getTable('craue_config_setting') . " WHERE name = 'wallabag_url'");
27 } 24 }
28 25
29 /**
30 * @param Schema $schema
31 */
32 public function down(Schema $schema) 26 public function down(Schema $schema)
33 { 27 {
34 $this->addSql('INSERT INTO ' . $this->getTable('craue_config_setting') . " (name, value, section) VALUES ('wallabag_url', 'wallabag.me', 'misc')"); 28 $this->addSql('INSERT INTO ' . $this->getTable('craue_config_setting') . " (name, value, section) VALUES ('wallabag_url', 'wallabag.me', 'misc')");
diff --git a/app/DoctrineMigrations/Version20170719231144.php b/app/DoctrineMigrations/Version20170719231144.php
index 93fe7f26..7a9731d4 100644
--- a/app/DoctrineMigrations/Version20170719231144.php
+++ b/app/DoctrineMigrations/Version20170719231144.php
@@ -10,9 +10,6 @@ use Wallabag\CoreBundle\Doctrine\WallabagMigration;
10 */ 10 */
11class Version20170719231144 extends WallabagMigration 11class Version20170719231144 extends WallabagMigration
12{ 12{
13 /**
14 * @param Schema $schema
15 */
16 public function up(Schema $schema) 13 public function up(Schema $schema)
17 { 14 {
18 $this->skipIf('sqlite' === $this->connection->getDatabasePlatform()->getName(), 'Migration can only be executed safely on \'mysql\' or \'postgresql\'.'); 15 $this->skipIf('sqlite' === $this->connection->getDatabasePlatform()->getName(), 'Migration can only be executed safely on \'mysql\' or \'postgresql\'.');
@@ -89,9 +86,6 @@ class Version20170719231144 extends WallabagMigration
89 ); 86 );
90 } 87 }
91 88
92 /**
93 * @param Schema $schema
94 */
95 public function down(Schema $schema) 89 public function down(Schema $schema)
96 { 90 {
97 throw new SkipMigrationException('Too complex ...'); 91 throw new SkipMigrationException('Too complex ...');
diff --git a/app/DoctrineMigrations/Version20170824113337.php b/app/DoctrineMigrations/Version20170824113337.php
index 5fc31de9..dc20f6d9 100644
--- a/app/DoctrineMigrations/Version20170824113337.php
+++ b/app/DoctrineMigrations/Version20170824113337.php
@@ -10,9 +10,6 @@ use Wallabag\CoreBundle\Doctrine\WallabagMigration;
10 */ 10 */
11class Version20170824113337 extends WallabagMigration 11class Version20170824113337 extends WallabagMigration
12{ 12{
13 /**
14 * @param Schema $schema
15 */
16 public function up(Schema $schema) 13 public function up(Schema $schema)
17 { 14 {
18 $entryTable = $schema->getTable($this->getTable('entry')); 15 $entryTable = $schema->getTable($this->getTable('entry'));
@@ -37,9 +34,6 @@ class Version20170824113337 extends WallabagMigration
37 ); 34 );
38 } 35 }
39 36
40 /**
41 * @param Schema $schema
42 */
43 public function down(Schema $schema) 37 public function down(Schema $schema)
44 { 38 {
45 $entryTable = $schema->getTable($this->getTable('entry')); 39 $entryTable = $schema->getTable($this->getTable('entry'));
diff --git a/app/DoctrineMigrations/Version20171008195606.php b/app/DoctrineMigrations/Version20171008195606.php
index 6974232a..60d8777f 100644
--- a/app/DoctrineMigrations/Version20171008195606.php
+++ b/app/DoctrineMigrations/Version20171008195606.php
@@ -10,9 +10,6 @@ use Wallabag\CoreBundle\Doctrine\WallabagMigration;
10 */ 10 */
11class Version20171008195606 extends WallabagMigration 11class Version20171008195606 extends WallabagMigration
12{ 12{
13 /**
14 * @param Schema $schema
15 */
16 public function up(Schema $schema) 13 public function up(Schema $schema)
17 { 14 {
18 $this->skipIf('sqlite' === $this->connection->getDatabasePlatform()->getName(), 'Migration can only be executed safely on \'mysql\' or \'postgresql\'.'); 15 $this->skipIf('sqlite' === $this->connection->getDatabasePlatform()->getName(), 'Migration can only be executed safely on \'mysql\' or \'postgresql\'.');
@@ -29,9 +26,6 @@ class Version20171008195606 extends WallabagMigration
29 } 26 }
30 } 27 }
31 28
32 /**
33 * @param Schema $schema
34 */
35 public function down(Schema $schema) 29 public function down(Schema $schema)
36 { 30 {
37 $this->skipIf('sqlite' === $this->connection->getDatabasePlatform()->getName(), 'Migration can only be executed safely on \'mysql\' or \'postgresql\'.'); 31 $this->skipIf('sqlite' === $this->connection->getDatabasePlatform()->getName(), 'Migration can only be executed safely on \'mysql\' or \'postgresql\'.');
diff --git a/app/DoctrineMigrations/Version20171105202000.php b/app/DoctrineMigrations/Version20171105202000.php
index 5ed787b9..5313a336 100644
--- a/app/DoctrineMigrations/Version20171105202000.php
+++ b/app/DoctrineMigrations/Version20171105202000.php
@@ -10,9 +10,6 @@ use Wallabag\CoreBundle\Doctrine\WallabagMigration;
10 */ 10 */
11class Version20171105202000 extends WallabagMigration 11class Version20171105202000 extends WallabagMigration
12{ 12{
13 /**
14 * @param Schema $schema
15 */
16 public function up(Schema $schema) 13 public function up(Schema $schema)
17 { 14 {
18 $entryTable = $schema->getTable($this->getTable('entry')); 15 $entryTable = $schema->getTable($this->getTable('entry'));
@@ -24,9 +21,6 @@ class Version20171105202000 extends WallabagMigration
24 ]); 21 ]);
25 } 22 }
26 23
27 /**
28 * @param Schema $schema
29 */
30 public function down(Schema $schema) 24 public function down(Schema $schema)
31 { 25 {
32 $entryTable = $schema->getTable($this->getTable('entry')); 26 $entryTable = $schema->getTable($this->getTable('entry'));
diff --git a/app/DoctrineMigrations/Version20171120163128.php b/app/DoctrineMigrations/Version20171120163128.php
index 48f10f1d..a6d126a5 100644
--- a/app/DoctrineMigrations/Version20171120163128.php
+++ b/app/DoctrineMigrations/Version20171120163128.php
@@ -10,9 +10,6 @@ use Wallabag\CoreBundle\Doctrine\WallabagMigration;
10 */ 10 */
11class Version20171120163128 extends WallabagMigration 11class Version20171120163128 extends WallabagMigration
12{ 12{
13 /**
14 * @param Schema $schema
15 */
16 public function up(Schema $schema) 13 public function up(Schema $schema)
17 { 14 {
18 $storeArticleHeaders = $this->container 15 $storeArticleHeaders = $this->container
@@ -25,9 +22,6 @@ class Version20171120163128 extends WallabagMigration
25 $this->addSql('INSERT INTO ' . $this->getTable('craue_config_setting') . " (name, value, section) VALUES ('store_article_headers', '0', 'entry')"); 22 $this->addSql('INSERT INTO ' . $this->getTable('craue_config_setting') . " (name, value, section) VALUES ('store_article_headers', '0', 'entry')");
26 } 23 }
27 24
28 /**
29 * @param Schema $schema
30 */
31 public function down(Schema $schema) 25 public function down(Schema $schema)
32 { 26 {
33 $this->addSql('DELETE FROM ' . $this->getTable('craue_config_setting') . " WHERE name = 'store_article_headers';"); 27 $this->addSql('DELETE FROM ' . $this->getTable('craue_config_setting') . " WHERE name = 'store_article_headers';");
diff --git a/app/DoctrineMigrations/Version20171125164500.php b/app/DoctrineMigrations/Version20171125164500.php
index a72463f0..2ee49d87 100644
--- a/app/DoctrineMigrations/Version20171125164500.php
+++ b/app/DoctrineMigrations/Version20171125164500.php
@@ -10,9 +10,6 @@ use Wallabag\CoreBundle\Doctrine\WallabagMigration;
10 */ 10 */
11class Version20171125164500 extends WallabagMigration 11class Version20171125164500 extends WallabagMigration
12{ 12{
13 /**
14 * @param Schema $schema
15 */
16 public function up(Schema $schema) 13 public function up(Schema $schema)
17 { 14 {
18 $shaarliShareOriginUrl = $this->container 15 $shaarliShareOriginUrl = $this->container
@@ -25,9 +22,6 @@ class Version20171125164500 extends WallabagMigration
25 $this->addSql('INSERT INTO ' . $this->getTable('craue_config_setting') . " (name, value, section) VALUES ('shaarli_share_origin_url', '0', 'entry')"); 22 $this->addSql('INSERT INTO ' . $this->getTable('craue_config_setting') . " (name, value, section) VALUES ('shaarli_share_origin_url', '0', 'entry')");
26 } 23 }
27 24
28 /**
29 * @param Schema $schema
30 */
31 public function down(Schema $schema) 25 public function down(Schema $schema)
32 { 26 {
33 $this->addSql('DELETE FROM ' . $this->getTable('craue_config_setting') . " WHERE name = 'shaarli_share_origin_url';"); 27 $this->addSql('DELETE FROM ' . $this->getTable('craue_config_setting') . " WHERE name = 'shaarli_share_origin_url';");
diff --git a/app/DoctrineMigrations/Version20180405182455.php b/app/DoctrineMigrations/Version20180405182455.php
new file mode 100755
index 00000000..1b8c3b0e
--- /dev/null
+++ b/app/DoctrineMigrations/Version20180405182455.php
@@ -0,0 +1,45 @@
1<?php
2
3namespace Application\Migrations;
4
5use Doctrine\DBAL\Schema\Schema;
6use Wallabag\CoreBundle\Doctrine\WallabagMigration;
7
8/**
9 * Add archived_at column and set its value to updated_at for is_archived entries.
10 */
11class Version20180405182455 extends WallabagMigration
12{
13 public function up(Schema $schema)
14 {
15 $entryTable = $schema->getTable($this->getTable('entry'));
16
17 $this->skipIf($entryTable->hasColumn('archived_at'), 'It seems that you already played this migration.');
18
19 $entryTable->addColumn('archived_at', 'datetime', [
20 'notnull' => false,
21 ]);
22 }
23
24 public function postUp(Schema $schema)
25 {
26 $entryTable = $schema->getTable($this->getTable('entry'));
27 $this->skipIf(!$entryTable->hasColumn('archived_at'), 'Unable to add archived_at colum');
28
29 $this->connection->executeQuery(
30 'UPDATE ' . $this->getTable('entry') . ' SET archived_at = updated_at WHERE is_archived = :is_archived',
31 [
32 'is_archived' => true,
33 ]
34 );
35 }
36
37 public function down(Schema $schema)
38 {
39 $entryTable = $schema->getTable($this->getTable('entry'));
40
41 $this->skipIf(!$entryTable->hasColumn('archived_at'), 'It seems that you already played this migration.');
42
43 $entryTable->dropColumn('archived_at');
44 }
45}
diff --git a/app/DoctrineMigrations/Version20181128203230.php b/app/DoctrineMigrations/Version20181128203230.php
new file mode 100644
index 00000000..add161cd
--- /dev/null
+++ b/app/DoctrineMigrations/Version20181128203230.php
@@ -0,0 +1,42 @@
1<?php
2
3namespace Application\Migrations;
4
5use Doctrine\DBAL\Schema\Schema;
6use Wallabag\CoreBundle\Doctrine\WallabagMigration;
7
8/**
9 * Fix varchar field from vendor to work with utf8mb4.
10 */
11class Version20181128203230 extends WallabagMigration
12{
13 public function up(Schema $schema)
14 {
15 $this->skipIf('mysql' !== $this->connection->getDatabasePlatform()->getName(), 'This migration can only be applied on \'mysql\'.');
16
17 $this->addSql('ALTER TABLE ' . $this->getTable('oauth2_access_tokens') . ' CHANGE `token` `token` varchar(191) NOT NULL');
18 $this->addSql('ALTER TABLE ' . $this->getTable('oauth2_access_tokens') . ' CHANGE `scope` `scope` varchar(191)');
19 $this->addSql('ALTER TABLE ' . $this->getTable('oauth2_auth_codes') . ' CHANGE `token` `token` varchar(191) NOT NULL');
20 $this->addSql('ALTER TABLE ' . $this->getTable('oauth2_auth_codes') . ' CHANGE `scope` `scope` varchar(191)');
21 $this->addSql('ALTER TABLE ' . $this->getTable('oauth2_refresh_tokens') . ' CHANGE `token` `token` varchar(191) NOT NULL');
22 $this->addSql('ALTER TABLE ' . $this->getTable('oauth2_refresh_tokens') . ' CHANGE `scope` `scope` varchar(191)');
23 $this->addSql('ALTER TABLE ' . $this->getTable('craue_config_setting') . ' CHANGE `name` `name` varchar(191)');
24 $this->addSql('ALTER TABLE ' . $this->getTable('craue_config_setting') . ' CHANGE `section` `section` varchar(191)');
25 $this->addSql('ALTER TABLE ' . $this->getTable('craue_config_setting') . ' CHANGE `value` `value` varchar(191)');
26 }
27
28 public function down(Schema $schema)
29 {
30 $this->skipIf('mysql' !== $this->connection->getDatabasePlatform()->getName(), 'This migration can only be applied on \'mysql\'.');
31
32 $this->addSql('ALTER TABLE ' . $this->getTable('oauth2_access_tokens') . ' CHANGE `token` `token` varchar(255) NOT NULL');
33 $this->addSql('ALTER TABLE ' . $this->getTable('oauth2_access_tokens') . ' CHANGE `scope` `scope` varchar(255)');
34 $this->addSql('ALTER TABLE ' . $this->getTable('oauth2_auth_codes') . ' CHANGE `token` `token` varchar(255) NOT NULL');
35 $this->addSql('ALTER TABLE ' . $this->getTable('oauth2_auth_codes') . ' CHANGE `scope` `scope` varchar(255)');
36 $this->addSql('ALTER TABLE ' . $this->getTable('oauth2_refresh_tokens') . ' CHANGE `token` `token` varchar(255) NOT NULL');
37 $this->addSql('ALTER TABLE ' . $this->getTable('oauth2_refresh_tokens') . ' CHANGE `scope` `scope` varchar(255)');
38 $this->addSql('ALTER TABLE ' . $this->getTable('craue_config_setting') . ' CHANGE `name` `name` varchar(255)');
39 $this->addSql('ALTER TABLE ' . $this->getTable('craue_config_setting') . ' CHANGE `section` `section` varchar(255)');
40 $this->addSql('ALTER TABLE ' . $this->getTable('craue_config_setting') . ' CHANGE `value` `value` varchar(255)');
41 }
42}
diff --git a/app/DoctrineMigrations/Version20181202073750.php b/app/DoctrineMigrations/Version20181202073750.php
new file mode 100644
index 00000000..5978291e
--- /dev/null
+++ b/app/DoctrineMigrations/Version20181202073750.php
@@ -0,0 +1,76 @@
1<?php
2
3namespace Application\Migrations;
4
5use Doctrine\DBAL\Schema\Schema;
6use Wallabag\CoreBundle\Doctrine\WallabagMigration;
7
8/**
9 * Add 2fa OTP stuff.
10 */
11final class Version20181202073750 extends WallabagMigration
12{
13 public function up(Schema $schema): void
14 {
15 switch ($this->connection->getDatabasePlatform()->getName()) {
16 case 'sqlite':
17 $this->addSql('DROP INDEX UNIQ_1D63E7E5C05FB297');
18 $this->addSql('DROP INDEX UNIQ_1D63E7E5A0D96FBF');
19 $this->addSql('DROP INDEX UNIQ_1D63E7E592FC23A8');
20 $this->addSql('CREATE TEMPORARY TABLE __temp__' . $this->getTable('user', true) . ' AS SELECT id, username, username_canonical, email, email_canonical, enabled, salt, password, last_login, confirmation_token, password_requested_at, roles, name, created_at, updated_at, authCode, twoFactorAuthentication FROM ' . $this->getTable('user', true) . '');
21 $this->addSql('DROP TABLE ' . $this->getTable('user', true) . '');
22 $this->addSql('CREATE TABLE ' . $this->getTable('user', true) . ' (id INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, username VARCHAR(180) NOT NULL COLLATE BINARY, username_canonical VARCHAR(180) NOT NULL COLLATE BINARY, email VARCHAR(180) NOT NULL COLLATE BINARY, email_canonical VARCHAR(180) NOT NULL COLLATE BINARY, enabled BOOLEAN NOT NULL, password VARCHAR(255) NOT NULL COLLATE BINARY, last_login DATETIME DEFAULT NULL, password_requested_at DATETIME DEFAULT NULL, name CLOB DEFAULT NULL COLLATE BINARY, created_at DATETIME NOT NULL, updated_at DATETIME NOT NULL, authCode INTEGER DEFAULT NULL, emailTwoFactor BOOLEAN NOT NULL, salt VARCHAR(255) DEFAULT NULL, confirmation_token VARCHAR(180) DEFAULT NULL, roles CLOB NOT NULL --(DC2Type:array)
23 , googleAuthenticatorSecret VARCHAR(255) DEFAULT NULL, backupCodes CLOB DEFAULT NULL --(DC2Type:json_array)
24 )');
25 $this->addSql('INSERT INTO ' . $this->getTable('user', true) . ' (id, username, username_canonical, email, email_canonical, enabled, salt, password, last_login, confirmation_token, password_requested_at, roles, name, created_at, updated_at, authCode, emailTwoFactor) SELECT id, username, username_canonical, email, email_canonical, enabled, salt, password, last_login, confirmation_token, password_requested_at, roles, name, created_at, updated_at, authCode, twoFactorAuthentication FROM __temp__' . $this->getTable('user', true) . '');
26 $this->addSql('DROP TABLE __temp__' . $this->getTable('user', true) . '');
27 $this->addSql('CREATE UNIQUE INDEX UNIQ_1D63E7E5C05FB297 ON ' . $this->getTable('user', true) . ' (confirmation_token)');
28 $this->addSql('CREATE UNIQUE INDEX UNIQ_1D63E7E5A0D96FBF ON ' . $this->getTable('user', true) . ' (email_canonical)');
29 $this->addSql('CREATE UNIQUE INDEX UNIQ_1D63E7E592FC23A8 ON ' . $this->getTable('user', true) . ' (username_canonical)');
30 break;
31 case 'mysql':
32 $this->addSql('ALTER TABLE ' . $this->getTable('user') . ' ADD googleAuthenticatorSecret VARCHAR(191) DEFAULT NULL');
33 $this->addSql('ALTER TABLE ' . $this->getTable('user') . ' CHANGE twoFactorAuthentication emailTwoFactor BOOLEAN NOT NULL');
34 $this->addSql('ALTER TABLE ' . $this->getTable('user') . ' DROP trusted');
35 $this->addSql('ALTER TABLE ' . $this->getTable('user') . ' ADD backupCodes LONGTEXT DEFAULT NULL COMMENT \'(DC2Type:json_array)\'');
36 break;
37 case 'postgresql':
38 $this->addSql('ALTER TABLE ' . $this->getTable('user') . ' ADD googleAuthenticatorSecret VARCHAR(191) DEFAULT NULL');
39 $this->addSql('ALTER TABLE ' . $this->getTable('user') . ' RENAME COLUMN twofactorauthentication TO emailTwoFactor');
40 $this->addSql('ALTER TABLE ' . $this->getTable('user') . ' DROP trusted');
41 $this->addSql('ALTER TABLE ' . $this->getTable('user') . ' ADD backupCodes TEXT DEFAULT NULL');
42 break;
43 }
44 }
45
46 public function down(Schema $schema): void
47 {
48 switch ($this->connection->getDatabasePlatform()->getName()) {
49 case 'sqlite':
50 $this->addSql('DROP INDEX UNIQ_1D63E7E592FC23A8');
51 $this->addSql('DROP INDEX UNIQ_1D63E7E5A0D96FBF');
52 $this->addSql('DROP INDEX UNIQ_1D63E7E5C05FB297');
53 $this->addSql('CREATE TEMPORARY TABLE __temp__' . $this->getTable('user', true) . ' AS SELECT id, username, username_canonical, email, email_canonical, enabled, salt, password, last_login, confirmation_token, password_requested_at, roles, name, created_at, updated_at, authCode, emailTwoFactor FROM "' . $this->getTable('user', true) . '"');
54 $this->addSql('DROP TABLE "' . $this->getTable('user', true) . '"');
55 $this->addSql('CREATE TABLE "' . $this->getTable('user', true) . '" (id INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, username VARCHAR(180) NOT NULL, username_canonical VARCHAR(180) NOT NULL, email VARCHAR(180) NOT NULL, email_canonical VARCHAR(180) NOT NULL, enabled BOOLEAN NOT NULL, password VARCHAR(255) NOT NULL, last_login DATETIME DEFAULT NULL, password_requested_at DATETIME DEFAULT NULL, name CLOB DEFAULT NULL, created_at DATETIME NOT NULL, updated_at DATETIME NOT NULL, authCode INTEGER DEFAULT NULL, twoFactorAuthentication BOOLEAN NOT NULL, salt VARCHAR(255) NOT NULL COLLATE BINARY, confirmation_token VARCHAR(255) DEFAULT NULL COLLATE BINARY, roles CLOB NOT NULL COLLATE BINARY, trusted CLOB DEFAULT NULL COLLATE BINARY)');
56 $this->addSql('INSERT INTO "' . $this->getTable('user', true) . '" (id, username, username_canonical, email, email_canonical, enabled, salt, password, last_login, confirmation_token, password_requested_at, roles, name, created_at, updated_at, authCode, twoFactorAuthentication) SELECT id, username, username_canonical, email, email_canonical, enabled, salt, password, last_login, confirmation_token, password_requested_at, roles, name, created_at, updated_at, authCode, emailTwoFactor FROM __temp__' . $this->getTable('user', true) . '');
57 $this->addSql('DROP TABLE __temp__' . $this->getTable('user', true) . '');
58 $this->addSql('CREATE UNIQUE INDEX UNIQ_1D63E7E592FC23A8 ON "' . $this->getTable('user', true) . '" (username_canonical)');
59 $this->addSql('CREATE UNIQUE INDEX UNIQ_1D63E7E5A0D96FBF ON "' . $this->getTable('user', true) . '" (email_canonical)');
60 $this->addSql('CREATE UNIQUE INDEX UNIQ_1D63E7E5C05FB297 ON "' . $this->getTable('user', true) . '" (confirmation_token)');
61 break;
62 case 'mysql':
63 $this->addSql('ALTER TABLE `' . $this->getTable('user') . '` DROP googleAuthenticatorSecret');
64 $this->addSql('ALTER TABLE `' . $this->getTable('user') . '` CHANGE emailtwofactor twoFactorAuthentication BOOLEAN NOT NULL');
65 $this->addSql('ALTER TABLE `' . $this->getTable('user') . '` ADD trusted TEXT DEFAULT NULL');
66 $this->addSql('ALTER TABLE `' . $this->getTable('user') . '` DROP backupCodes');
67 break;
68 case 'postgresql':
69 $this->addSql('ALTER TABLE ' . $this->getTable('user') . ' DROP googleAuthenticatorSecret');
70 $this->addSql('ALTER TABLE ' . $this->getTable('user') . ' RENAME COLUMN emailTwoFactor TO twofactorauthentication');
71 $this->addSql('ALTER TABLE ' . $this->getTable('user') . ' ADD trusted TEXT DEFAULT NULL');
72 $this->addSql('ALTER TABLE ' . $this->getTable('user') . ' DROP backupCodes');
73 break;
74 }
75 }
76}
diff --git a/app/DoctrineMigrations/Version20190117131816.php b/app/DoctrineMigrations/Version20190117131816.php
new file mode 100644
index 00000000..6548b9fa
--- /dev/null
+++ b/app/DoctrineMigrations/Version20190117131816.php
@@ -0,0 +1,32 @@
1<?php
2
3namespace Application\Migrations;
4
5use Doctrine\DBAL\Schema\Schema;
6use Wallabag\CoreBundle\Doctrine\WallabagMigration;
7
8/**
9 * Add updated_at fields to site_credential table.
10 */
11final class Version20190117131816 extends WallabagMigration
12{
13 public function up(Schema $schema): void
14 {
15 $siteCredentialTable = $schema->getTable($this->getTable('site_credential'));
16
17 $this->skipIf($siteCredentialTable->hasColumn('updated_at'), 'It seems that you already played this migration.');
18
19 $siteCredentialTable->addColumn('updated_at', 'datetime', [
20 'notnull' => false,
21 ]);
22 }
23
24 public function down(Schema $schema): void
25 {
26 $siteCredentialTable = $schema->getTable($this->getTable('site_credential'));
27
28 $this->skipIf(!$siteCredentialTable->hasColumn('updated_at'), 'It seems that you already played this migration.');
29
30 $siteCredentialTable->dropColumn('updated_at');
31 }
32}
diff --git a/app/DoctrineMigrations/Version20190129120000.php b/app/DoctrineMigrations/Version20190129120000.php
new file mode 100644
index 00000000..8c5e28ca
--- /dev/null
+++ b/app/DoctrineMigrations/Version20190129120000.php
@@ -0,0 +1,141 @@
1<?php
2
3namespace Application\Migrations;
4
5use Doctrine\DBAL\Schema\Schema;
6use Wallabag\CoreBundle\Doctrine\WallabagMigration;
7
8/**
9 * Add missing entries in craue_config_setting.
10 */
11final class Version20190129120000 extends WallabagMigration
12{
13 private $settings = [
14 [
15 'name' => 'carrot',
16 'value' => '1',
17 'section' => 'entry',
18 ],
19 [
20 'name' => 'share_diaspora',
21 'value' => '1',
22 'section' => 'entry',
23 ],
24 [
25 'name' => 'diaspora_url',
26 'value' => 'http://diasporapod.com',
27 'section' => 'entry',
28 ],
29 [
30 'name' => 'share_shaarli',
31 'value' => '1',
32 'section' => 'entry',
33 ],
34 [
35 'name' => 'shaarli_url',
36 'value' => 'http://myshaarli.com',
37 'section' => 'entry',
38 ],
39 [
40 'name' => 'share_mail',
41 'value' => '1',
42 'section' => 'entry',
43 ],
44 [
45 'name' => 'share_twitter',
46 'value' => '1',
47 'section' => 'entry',
48 ],
49 [
50 'name' => 'show_printlink',
51 'value' => '1',
52 'section' => 'entry',
53 ],
54 [
55 'name' => 'export_epub',
56 'value' => '1',
57 'section' => 'export',
58 ],
59 [
60 'name' => 'export_mobi',
61 'value' => '1',
62 'section' => 'export',
63 ],
64 [
65 'name' => 'export_pdf',
66 'value' => '1',
67 'section' => 'export',
68 ],
69 [
70 'name' => 'export_csv',
71 'value' => '1',
72 'section' => 'export',
73 ],
74 [
75 'name' => 'export_json',
76 'value' => '1',
77 'section' => 'export',
78 ],
79 [
80 'name' => 'export_txt',
81 'value' => '1',
82 'section' => 'export',
83 ],
84 [
85 'name' => 'export_xml',
86 'value' => '1',
87 'section' => 'export',
88 ],
89 [
90 'name' => 'piwik_enabled',
91 'value' => '0',
92 'section' => 'analytics',
93 ],
94 [
95 'name' => 'piwik_host',
96 'value' => 'v2.wallabag.org',
97 'section' => 'analytics',
98 ],
99 [
100 'name' => 'piwik_site_id',
101 'value' => '1',
102 'section' => 'analytics',
103 ],
104 [
105 'name' => 'demo_mode_enabled',
106 'value' => '0',
107 'section' => 'misc',
108 ],
109 [
110 'name' => 'demo_mode_username',
111 'value' => 'wallabag',
112 'section' => 'misc',
113 ],
114 [
115 'name' => 'wallabag_support_url',
116 'value' => 'https://www.wallabag.org/pages/support.html',
117 'section' => 'misc',
118 ],
119 ];
120
121 public function up(Schema $schema)
122 {
123 foreach ($this->settings as $setting) {
124 $settingEnabled = $this->container
125 ->get('doctrine.orm.default_entity_manager')
126 ->getConnection()
127 ->fetchArray('SELECT * FROM ' . $this->getTable('craue_config_setting') . " WHERE name = '" . $setting['name'] . "'");
128
129 if (false !== $settingEnabled) {
130 continue;
131 }
132
133 $this->addSql('INSERT INTO ' . $this->getTable('craue_config_setting') . " (name, value, section) VALUES ('" . $setting['name'] . "', '" . $setting['value'] . "', '" . $setting['section'] . "');");
134 }
135 }
136
137 public function down(Schema $schema)
138 {
139 $this->skipIf(true, 'These settings are required and should not be removed.');
140 }
141}
diff --git a/app/DoctrineMigrations/Version20190401105353.php b/app/DoctrineMigrations/Version20190401105353.php
new file mode 100644
index 00000000..600fc162
--- /dev/null
+++ b/app/DoctrineMigrations/Version20190401105353.php
@@ -0,0 +1,36 @@
1<?php
2
3namespace Application\Migrations;
4
5use Doctrine\DBAL\Schema\Schema;
6use Wallabag\CoreBundle\Doctrine\WallabagMigration;
7
8/**
9 * Add hashed_url in entry.
10 */
11class Version20190401105353 extends WallabagMigration
12{
13 public function up(Schema $schema)
14 {
15 $entryTable = $schema->getTable($this->getTable('entry'));
16
17 $this->skipIf($entryTable->hasColumn('hashed_url'), 'It seems that you already played this migration.');
18
19 $entryTable->addColumn('hashed_url', 'text', [
20 'length' => 40,
21 'notnull' => false,
22 ]);
23
24 $entryTable->addIndex(['user_id', 'hashed_url'], 'hashed_url_user_id', [], ['lengths' => [null, 40]]);
25 }
26
27 public function down(Schema $schema)
28 {
29 $entryTable = $schema->getTable($this->getTable('entry'));
30
31 $this->skipIf(!$entryTable->hasColumn('hashed_url'), 'It seems that you already played this migration.');
32
33 $entryTable->dropIndex('hashed_url_user_id');
34 $entryTable->dropColumn('hashed_url');
35 }
36}
diff --git a/app/DoctrineMigrations/Version20190425115043.php b/app/DoctrineMigrations/Version20190425115043.php
new file mode 100644
index 00000000..5c6ae494
--- /dev/null
+++ b/app/DoctrineMigrations/Version20190425115043.php
@@ -0,0 +1,58 @@
1<?php
2
3namespace Application\Migrations;
4
5use Doctrine\DBAL\Schema\Schema;
6use Wallabag\CoreBundle\Doctrine\WallabagMigration;
7
8/**
9 * Rename rss_token & rss_limit to feed_token & feed_limit.
10 */
11final class Version20190425115043 extends WallabagMigration
12{
13 public function up(Schema $schema): void
14 {
15 switch ($this->connection->getDatabasePlatform()->getName()) {
16 case 'sqlite':
17 $this->addSql('DROP INDEX UNIQ_87E64C53A76ED395');
18 $this->addSql('CREATE TEMPORARY TABLE __temp__' . $this->getTable('config', true) . ' AS SELECT id, user_id, theme, items_per_page, language, rss_token, rss_limit, reading_speed, pocket_consumer_key, action_mark_as_read, list_mode FROM ' . $this->getTable('config', true));
19 $this->addSql('DROP TABLE ' . $this->getTable('config', true));
20 $this->addSql('CREATE TABLE ' . $this->getTable('config', true) . ' (id INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, user_id INTEGER DEFAULT NULL, theme VARCHAR(255) NOT NULL COLLATE BINARY, items_per_page INTEGER NOT NULL, language VARCHAR(255) NOT NULL COLLATE BINARY, reading_speed DOUBLE PRECISION DEFAULT NULL, pocket_consumer_key VARCHAR(255) DEFAULT NULL COLLATE BINARY, action_mark_as_read INTEGER DEFAULT 0, list_mode INTEGER DEFAULT NULL, feed_token VARCHAR(255) DEFAULT NULL, feed_limit INTEGER DEFAULT NULL, CONSTRAINT FK_87E64C53A76ED395 FOREIGN KEY (user_id) REFERENCES "' . $this->getTable('user', true) . '" (id) NOT DEFERRABLE INITIALLY IMMEDIATE)');
21 $this->addSql('INSERT INTO ' . $this->getTable('config', true) . ' (id, user_id, theme, items_per_page, language, feed_token, feed_limit, reading_speed, pocket_consumer_key, action_mark_as_read, list_mode) SELECT id, user_id, theme, items_per_page, language, rss_token, rss_limit, reading_speed, pocket_consumer_key, action_mark_as_read, list_mode FROM __temp__' . $this->getTable('config', true));
22 $this->addSql('DROP TABLE __temp__' . $this->getTable('config', true));
23 $this->addSql('CREATE UNIQUE INDEX UNIQ_87E64C53A76ED395 ON ' . $this->getTable('config', true) . ' (user_id)');
24 break;
25 case 'mysql':
26 $this->addSql('ALTER TABLE ' . $this->getTable('config') . ' CHANGE rss_token feed_token VARCHAR(255) DEFAULT NULL');
27 $this->addSql('ALTER TABLE ' . $this->getTable('config') . ' CHANGE rss_limit feed_limit INT DEFAULT NULL');
28 break;
29 case 'postgresql':
30 $this->addSql('ALTER TABLE ' . $this->getTable('config') . ' RENAME COLUMN rss_token TO feed_token');
31 $this->addSql('ALTER TABLE ' . $this->getTable('config') . ' RENAME COLUMN rss_limit TO feed_limit');
32 break;
33 }
34 }
35
36 public function down(Schema $schema): void
37 {
38 switch ($this->connection->getDatabasePlatform()->getName()) {
39 case 'sqlite':
40 $this->addSql('DROP INDEX UNIQ_87E64C53A76ED395');
41 $this->addSql('CREATE TEMPORARY TABLE __temp__' . $this->getTable('config', true) . ' AS SELECT id, user_id, theme, items_per_page, language, feed_token, feed_limit, reading_speed, pocket_consumer_key, action_mark_as_read, list_mode FROM "' . $this->getTable('config', true) . '"');
42 $this->addSql('DROP TABLE "' . $this->getTable('config', true) . '"');
43 $this->addSql('CREATE TABLE "' . $this->getTable('config', true) . '" (id INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, user_id INTEGER DEFAULT NULL, theme VARCHAR(255) NOT NULL, items_per_page INTEGER NOT NULL, language VARCHAR(255) NOT NULL, reading_speed DOUBLE PRECISION DEFAULT NULL, pocket_consumer_key VARCHAR(255) DEFAULT NULL, action_mark_as_read INTEGER DEFAULT 0, list_mode INTEGER DEFAULT NULL, rss_token VARCHAR(255) DEFAULT NULL COLLATE BINARY, rss_limit INTEGER DEFAULT NULL)');
44 $this->addSql('INSERT INTO "' . $this->getTable('config', true) . '" (id, user_id, theme, items_per_page, language, rss_token, rss_limit, reading_speed, pocket_consumer_key, action_mark_as_read, list_mode) SELECT id, user_id, theme, items_per_page, language, feed_token, feed_limit, reading_speed, pocket_consumer_key, action_mark_as_read, list_mode FROM __temp__' . $this->getTable('config', true));
45 $this->addSql('DROP TABLE __temp__' . $this->getTable('config', true));
46 $this->addSql('CREATE UNIQUE INDEX UNIQ_87E64C53A76ED395 ON "' . $this->getTable('config', true) . '" (user_id)');
47 break;
48 case 'mysql':
49 $this->addSql('ALTER TABLE ' . $this->getTable('config') . ' CHANGE feed_token rss_token');
50 $this->addSql('ALTER TABLE ' . $this->getTable('config') . ' CHANGE feed_limit rss_limit');
51 break;
52 case 'postgresql':
53 $this->addSql('ALTER TABLE ' . $this->getTable('config') . ' RENAME COLUMN feed_token TO rss_token');
54 $this->addSql('ALTER TABLE ' . $this->getTable('config') . ' RENAME COLUMN feed_limit TO rss_limit');
55 break;
56 }
57 }
58}
diff --git a/app/DoctrineMigrations/Version20190510141130.php b/app/DoctrineMigrations/Version20190510141130.php
new file mode 100644
index 00000000..3c504e8a
--- /dev/null
+++ b/app/DoctrineMigrations/Version20190510141130.php
@@ -0,0 +1,96 @@
1<?php
2
3namespace Application\Migrations;
4
5use Doctrine\DBAL\Migrations\SkipMigrationException;
6use Doctrine\DBAL\Schema\Schema;
7use Wallabag\CoreBundle\Doctrine\WallabagMigration;
8
9/**
10 * Enable cascade delete when deleting a user on:
11 * - oauth2_access_tokens
12 * - oauth2_clients
13 * - oauth2_refresh_tokens
14 * - oauth2_auth_codes.
15 */
16final class Version20190510141130 extends WallabagMigration
17{
18 public function up(Schema $schema): void
19 {
20 switch ($this->connection->getDatabasePlatform()->getName()) {
21 case 'sqlite':
22 $this->addSql('DROP INDEX IDX_368A4209A76ED395');
23 $this->addSql('DROP INDEX IDX_368A420919EB6921');
24 $this->addSql('DROP INDEX UNIQ_368A42095F37A13B');
25 $this->addSql('CREATE TEMPORARY TABLE __temp__' . $this->getTable('oauth2_access_tokens', true) . ' AS SELECT id, client_id, user_id, token, expires_at, scope FROM ' . $this->getTable('oauth2_access_tokens', true));
26 $this->addSql('DROP TABLE ' . $this->getTable('oauth2_access_tokens', true));
27 $this->addSql('CREATE TABLE ' . $this->getTable('oauth2_access_tokens', true) . ' (id INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, client_id INTEGER NOT NULL, user_id INTEGER DEFAULT NULL, expires_at INTEGER DEFAULT NULL, token VARCHAR(191) NOT NULL, scope VARCHAR(191) NULL, CONSTRAINT FK_368A420919EB6921 FOREIGN KEY (client_id) REFERENCES ' . $this->getTable('oauth2_clients', true) . ' (id) NOT DEFERRABLE INITIALLY IMMEDIATE, CONSTRAINT FK_368A4209A76ED395 FOREIGN KEY (user_id) REFERENCES "' . $this->getTable('oauth2_clients', true) . '" (id) ON DELETE CASCADE NOT DEFERRABLE INITIALLY IMMEDIATE)');
28 $this->addSql('INSERT INTO ' . $this->getTable('oauth2_access_tokens', true) . ' (id, client_id, user_id, token, expires_at, scope) SELECT id, client_id, user_id, token, expires_at, scope FROM __temp__' . $this->getTable('oauth2_access_tokens', true));
29 $this->addSql('DROP TABLE __temp__' . $this->getTable('oauth2_access_tokens', true));
30 $this->addSql('CREATE INDEX IDX_368A4209A76ED395 ON ' . $this->getTable('oauth2_access_tokens', true) . ' (user_id)');
31 $this->addSql('CREATE INDEX IDX_368A420919EB6921 ON ' . $this->getTable('oauth2_access_tokens', true) . ' (client_id)');
32
33 $this->addSql('DROP INDEX IDX_635D765EA76ED395');
34 $this->addSql('CREATE TEMPORARY TABLE __temp__' . $this->getTable('oauth2_clients', true) . ' AS SELECT id, user_id, random_id, secret, redirect_uris, allowed_grant_types, name FROM ' . $this->getTable('oauth2_clients', true));
35 $this->addSql('DROP TABLE ' . $this->getTable('oauth2_clients', true));
36 $this->addSql('CREATE TABLE ' . $this->getTable('oauth2_clients', true) . ' (id INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, user_id INTEGER DEFAULT NULL, random_id VARCHAR(255) NOT NULL COLLATE BINARY, secret VARCHAR(255) NOT NULL COLLATE BINARY, name CLOB NOT NULL COLLATE BINARY, redirect_uris CLOB NOT NULL, allowed_grant_types CLOB NOT NULL, CONSTRAINT FK_635D765EA76ED395 FOREIGN KEY (user_id) REFERENCES "' . $this->getTable('oauth2_clients', true) . '" (id) NOT DEFERRABLE INITIALLY IMMEDIATE)');
37 $this->addSql('INSERT INTO ' . $this->getTable('oauth2_clients', true) . ' (id, user_id, random_id, secret, redirect_uris, allowed_grant_types, name) SELECT id, user_id, random_id, secret, redirect_uris, allowed_grant_types, name FROM __temp__' . $this->getTable('oauth2_clients', true));
38 $this->addSql('DROP TABLE __temp__' . $this->getTable('oauth2_clients', true));
39 $this->addSql('CREATE INDEX IDX_635D765EA76ED395 ON ' . $this->getTable('oauth2_clients', true) . ' (user_id)');
40
41 $this->addSql('DROP INDEX IDX_20C9FB24A76ED395');
42 $this->addSql('DROP INDEX IDX_20C9FB2419EB6921');
43 $this->addSql('DROP INDEX UNIQ_20C9FB245F37A13B');
44 $this->addSql('CREATE TEMPORARY TABLE __temp__' . $this->getTable('oauth2_refresh_tokens', true) . ' AS SELECT id, client_id, user_id, token, expires_at, scope FROM ' . $this->getTable('oauth2_refresh_tokens', true));
45 $this->addSql('DROP TABLE ' . $this->getTable('oauth2_refresh_tokens', true));
46 $this->addSql('CREATE TABLE ' . $this->getTable('oauth2_refresh_tokens', true) . ' (id INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, client_id INTEGER NOT NULL, user_id INTEGER DEFAULT NULL, expires_at INTEGER DEFAULT NULL, token VARCHAR(191) NOT NULL, scope VARCHAR(191) NULL, CONSTRAINT FK_20C9FB2419EB6921 FOREIGN KEY (client_id) REFERENCES ' . $this->getTable('oauth2_clients', true) . ' (id) NOT DEFERRABLE INITIALLY IMMEDIATE, CONSTRAINT FK_20C9FB24A76ED395 FOREIGN KEY (user_id) REFERENCES "' . $this->getTable('oauth2_clients', true) . '" (id) ON DELETE CASCADE NOT DEFERRABLE INITIALLY IMMEDIATE)');
47 $this->addSql('INSERT INTO ' . $this->getTable('oauth2_refresh_tokens', true) . ' (id, client_id, user_id, token, expires_at, scope) SELECT id, client_id, user_id, token, expires_at, scope FROM __temp__' . $this->getTable('oauth2_refresh_tokens', true));
48 $this->addSql('DROP TABLE __temp__' . $this->getTable('oauth2_refresh_tokens', true));
49 $this->addSql('CREATE INDEX IDX_20C9FB24A76ED395 ON ' . $this->getTable('oauth2_refresh_tokens', true) . ' (user_id)');
50 $this->addSql('CREATE INDEX IDX_20C9FB2419EB6921 ON ' . $this->getTable('oauth2_refresh_tokens', true) . ' (client_id)');
51
52 $this->addSql('DROP INDEX IDX_EE52E3FAA76ED395');
53 $this->addSql('DROP INDEX IDX_EE52E3FA19EB6921');
54 $this->addSql('DROP INDEX UNIQ_EE52E3FA5F37A13B');
55 $this->addSql('CREATE TEMPORARY TABLE __temp__' . $this->getTable('oauth2_auth_codes', true) . ' AS SELECT id, client_id, user_id, token, redirect_uri, expires_at, scope FROM ' . $this->getTable('oauth2_auth_codes', true));
56 $this->addSql('DROP TABLE ' . $this->getTable('oauth2_auth_codes', true));
57 $this->addSql('CREATE TABLE ' . $this->getTable('oauth2_auth_codes', true) . ' (id INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, client_id INTEGER NOT NULL, user_id INTEGER DEFAULT NULL, redirect_uri CLOB NOT NULL COLLATE BINARY, expires_at INTEGER DEFAULT NULL, token VARCHAR(191) NOT NULL, scope VARCHAR(191) NULL, CONSTRAINT FK_EE52E3FA19EB6921 FOREIGN KEY (client_id) REFERENCES ' . $this->getTable('oauth2_clients', true) . ' (id) NOT DEFERRABLE INITIALLY IMMEDIATE, CONSTRAINT FK_EE52E3FAA76ED395 FOREIGN KEY (user_id) REFERENCES "' . $this->getTable('oauth2_clients', true) . '" (id) ON DELETE CASCADE NOT DEFERRABLE INITIALLY IMMEDIATE)');
58 $this->addSql('INSERT INTO ' . $this->getTable('oauth2_auth_codes', true) . ' (id, client_id, user_id, token, redirect_uri, expires_at, scope) SELECT id, client_id, user_id, token, redirect_uri, expires_at, scope FROM __temp__' . $this->getTable('oauth2_auth_codes', true));
59 $this->addSql('DROP TABLE __temp__' . $this->getTable('oauth2_auth_codes', true));
60 $this->addSql('CREATE INDEX IDX_EE52E3FAA76ED395 ON ' . $this->getTable('oauth2_auth_codes', true) . ' (user_id)');
61 $this->addSql('CREATE INDEX IDX_EE52E3FA19EB6921 ON ' . $this->getTable('oauth2_auth_codes', true) . ' (client_id)');
62 break;
63 case 'mysql':
64 $this->addSql('ALTER TABLE ' . $this->getTable('oauth2_access_tokens') . ' DROP FOREIGN KEY FK_368A4209A76ED395');
65 $this->addSql('ALTER TABLE ' . $this->getTable('oauth2_access_tokens') . ' ADD CONSTRAINT FK_368A4209A76ED395 FOREIGN KEY (user_id) REFERENCES ' . $this->getTable('user') . ' (id) ON DELETE CASCADE');
66
67 $this->addSql('ALTER TABLE ' . $this->getTable('oauth2_clients') . ' DROP FOREIGN KEY IDX_user_oauth_client');
68 $this->addSql('ALTER TABLE ' . $this->getTable('oauth2_clients') . ' ADD CONSTRAINT FK_635D765EA76ED395 FOREIGN KEY (user_id) REFERENCES ' . $this->getTable('user') . ' (id)');
69
70 $this->addSql('ALTER TABLE ' . $this->getTable('oauth2_refresh_tokens') . ' DROP FOREIGN KEY FK_20C9FB24A76ED395');
71 $this->addSql('ALTER TABLE ' . $this->getTable('oauth2_refresh_tokens') . ' ADD CONSTRAINT FK_20C9FB24A76ED395 FOREIGN KEY (user_id) REFERENCES ' . $this->getTable('user') . ' (id) ON DELETE CASCADE');
72
73 $this->addSql('ALTER TABLE ' . $this->getTable('oauth2_auth_codes') . ' DROP FOREIGN KEY FK_EE52E3FAA76ED395');
74 $this->addSql('ALTER TABLE ' . $this->getTable('oauth2_auth_codes') . ' ADD CONSTRAINT FK_EE52E3FAA76ED395 FOREIGN KEY (user_id) REFERENCES ' . $this->getTable('user') . ' (id) ON DELETE CASCADE');
75 break;
76 case 'postgresql':
77 $this->addSql('ALTER TABLE ' . $this->getTable('oauth2_access_tokens') . ' DROP CONSTRAINT FK_368A4209A76ED395');
78 $this->addSql('ALTER TABLE ' . $this->getTable('oauth2_access_tokens') . ' ADD CONSTRAINT FK_368A4209A76ED395 FOREIGN KEY (user_id) REFERENCES ' . $this->getTable('user') . ' (id) ON DELETE CASCADE NOT DEFERRABLE INITIALLY IMMEDIATE');
79
80 $this->addSql('ALTER TABLE ' . $this->getTable('oauth2_clients') . ' DROP CONSTRAINT idx_user_oauth_client');
81 $this->addSql('ALTER TABLE ' . $this->getTable('oauth2_clients') . ' ADD CONSTRAINT FK_635D765EA76ED395 FOREIGN KEY (user_id) REFERENCES ' . $this->getTable('user') . ' (id) NOT DEFERRABLE INITIALLY IMMEDIATE');
82
83 $this->addSql('ALTER TABLE ' . $this->getTable('oauth2_refresh_tokens') . ' DROP CONSTRAINT FK_20C9FB24A76ED395');
84 $this->addSql('ALTER TABLE ' . $this->getTable('oauth2_refresh_tokens') . ' ADD CONSTRAINT FK_20C9FB24A76ED395 FOREIGN KEY (user_id) REFERENCES ' . $this->getTable('user') . ' (id) ON DELETE CASCADE NOT DEFERRABLE INITIALLY IMMEDIATE');
85
86 $this->addSql('ALTER TABLE ' . $this->getTable('oauth2_auth_codes') . ' DROP CONSTRAINT FK_EE52E3FAA76ED395');
87 $this->addSql('ALTER TABLE ' . $this->getTable('oauth2_auth_codes') . ' ADD CONSTRAINT FK_EE52E3FAA76ED395 FOREIGN KEY (user_id) REFERENCES ' . $this->getTable('user') . ' (id) ON DELETE CASCADE NOT DEFERRABLE INITIALLY IMMEDIATE');
88 break;
89 }
90 }
91
92 public function down(Schema $schema): void
93 {
94 throw new SkipMigrationException('Too complex ...');
95 }
96}
diff --git a/app/DoctrineMigrations/Version20190511165128.php b/app/DoctrineMigrations/Version20190511165128.php
new file mode 100644
index 00000000..7b6b1bec
--- /dev/null
+++ b/app/DoctrineMigrations/Version20190511165128.php
@@ -0,0 +1,30 @@
1<?php
2
3declare(strict_types=1);
4
5namespace Application\Migrations;
6
7use Doctrine\DBAL\Schema\Schema;
8use Wallabag\CoreBundle\Doctrine\WallabagMigration;
9
10/**
11 * Convert tab label to utf8mb4_bin (MySQL only).
12 */
13final class Version20190511165128 extends WallabagMigration
14{
15 public function up(Schema $schema): void
16 {
17 $this->skipIf('mysql' !== $this->connection->getDatabasePlatform()->getName(), 'This migration only apply to MySQL');
18
19 $this->addSql('ALTER TABLE ' . $this->getTable('tag') . ' CHANGE `label` `label` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin;');
20 $this->addSql('ALTER TABLE ' . $this->getTable('tag') . ' CHANGE `slug` `slug` VARCHAR(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin;');
21 }
22
23 public function down(Schema $schema): void
24 {
25 $this->skipIf('mysql' !== $this->connection->getDatabasePlatform()->getName(), 'This migration only apply to MySQL');
26
27 $this->addSql('ALTER TABLE ' . $this->getTable('tag') . ' CHANGE `slug` `slug` VARCHAR(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;');
28 $this->addSql('ALTER TABLE ' . $this->getTable('tag') . ' CHANGE `label` `label` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;');
29 }
30}
diff --git a/app/DoctrineMigrations/Version20190601125843.php b/app/DoctrineMigrations/Version20190601125843.php
new file mode 100644
index 00000000..cbb92edc
--- /dev/null
+++ b/app/DoctrineMigrations/Version20190601125843.php
@@ -0,0 +1,48 @@
1<?php
2
3namespace Application\Migrations;
4
5use Doctrine\DBAL\Schema\Schema;
6use Wallabag\CoreBundle\Doctrine\WallabagMigration;
7
8/**
9 * Added `given_url` & `hashed_given_url` field in entry table.
10 */
11class Version20190601125843 extends WallabagMigration
12{
13 public function up(Schema $schema)
14 {
15 $entryTable = $schema->getTable($this->getTable('entry'));
16
17 if (!$entryTable->hasColumn('given_url')) {
18 $entryTable->addColumn('given_url', 'text', [
19 'notnull' => false,
20 ]);
21 }
22
23 if (!$entryTable->hasColumn('hashed_given_url')) {
24 $entryTable->addColumn('hashed_given_url', 'text', [
25 'length' => 40,
26 'notnull' => false,
27 ]);
28 }
29
30 // 40 = length of sha1 field hashed_given_url
31 $entryTable->addIndex(['user_id', 'hashed_given_url'], 'hashed_given_url_user_id', [], ['lengths' => [null, 40]]);
32 }
33
34 public function down(Schema $schema)
35 {
36 $entryTable = $schema->getTable($this->getTable('entry'));
37
38 if ($entryTable->hasColumn('given_url')) {
39 $entryTable->dropColumn('given_url');
40 }
41
42 if ($entryTable->hasColumn('hashed_given_url')) {
43 $entryTable->dropColumn('hashed_given_url');
44 }
45
46 $entryTable->dropIndex('hashed_given_url_user_id');
47 }
48}
diff --git a/app/DoctrineMigrations/Version20190619093534.php b/app/DoctrineMigrations/Version20190619093534.php
new file mode 100644
index 00000000..9a062536
--- /dev/null
+++ b/app/DoctrineMigrations/Version20190619093534.php
@@ -0,0 +1,65 @@
1<?php
2
3namespace Application\Migrations;
4
5use Doctrine\DBAL\Schema\Schema;
6use Wallabag\CoreBundle\Doctrine\WallabagMigration;
7
8/**
9 * Change reading_time field on SQLite to be integer NOT NULL
10 * It was forgotten in a previous migration (Version20171008195606.php).
11 */
12final class Version20190619093534 extends WallabagMigration
13{
14 public function up(Schema $schema): void
15 {
16 // this up() migration is auto-generated, please modify it to your needs
17 $this->skipIf('sqlite' !== $this->connection->getDatabasePlatform()->getName(), 'Migration can only be executed safely on \'sqlite\'.');
18
19 $this->addSql('UPDATE ' . $this->getTable('entry', true) . ' SET reading_time = 0 WHERE reading_time IS NULL;');
20
21 $this->addSql('DROP INDEX hashed_given_url_user_id');
22 $this->addSql('DROP INDEX IDX_entry_uid');
23 $this->addSql('DROP INDEX IDX_F4D18282A76ED395');
24 $this->addSql('DROP INDEX IDX_entry_created_at');
25 $this->addSql('DROP INDEX IDX_entry_starred');
26 $this->addSql('DROP INDEX IDX_entry_archived');
27 $this->addSql('DROP INDEX hashed_url_user_id');
28 $this->addSql('CREATE TEMPORARY TABLE __temp__' . $this->getTable('entry', true) . ' AS SELECT id, user_id, title, url, is_archived, is_starred, content, created_at, updated_at, mimetype, language, reading_time, domain_name, preview_picture, uid, http_status, published_at, published_by, headers, starred_at, origin_url, archived_at, hashed_url, given_url, hashed_given_url FROM ' . $this->getTable('entry', true) . '');
29 $this->addSql('DROP TABLE ' . $this->getTable('entry', true) . '');
30 $this->addSql('CREATE TABLE ' . $this->getTable('entry', true) . ' (id INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, user_id INTEGER DEFAULT NULL, title CLOB DEFAULT NULL COLLATE BINARY, url CLOB DEFAULT NULL COLLATE BINARY, is_archived BOOLEAN NOT NULL, is_starred BOOLEAN NOT NULL, content CLOB DEFAULT NULL COLLATE BINARY, created_at DATETIME NOT NULL, updated_at DATETIME NOT NULL, mimetype CLOB DEFAULT NULL COLLATE BINARY, language CLOB DEFAULT NULL COLLATE BINARY, domain_name CLOB DEFAULT NULL COLLATE BINARY, preview_picture CLOB DEFAULT NULL COLLATE BINARY, uid VARCHAR(23) DEFAULT NULL COLLATE BINARY, http_status VARCHAR(3) DEFAULT NULL COLLATE BINARY, published_at DATETIME DEFAULT NULL, starred_at DATETIME DEFAULT NULL, origin_url CLOB DEFAULT NULL COLLATE BINARY, archived_at DATETIME DEFAULT NULL, given_url CLOB DEFAULT NULL COLLATE BINARY, reading_time INTEGER NOT NULL, published_by CLOB DEFAULT NULL --(DC2Type:array)
31 , headers CLOB DEFAULT NULL --(DC2Type:array)
32 , hashed_url VARCHAR(40) DEFAULT NULL, hashed_given_url VARCHAR(40) DEFAULT NULL, CONSTRAINT FK_F4D18282A76ED395 FOREIGN KEY (user_id) REFERENCES "' . $this->getTable('user', true) . '" (id) NOT DEFERRABLE INITIALLY IMMEDIATE)');
33 $this->addSql('INSERT INTO ' . $this->getTable('entry', true) . ' (id, user_id, title, url, is_archived, is_starred, content, created_at, updated_at, mimetype, language, reading_time, domain_name, preview_picture, uid, http_status, published_at, published_by, headers, starred_at, origin_url, archived_at, hashed_url, given_url, hashed_given_url) SELECT id, user_id, title, url, is_archived, is_starred, content, created_at, updated_at, mimetype, language, reading_time, domain_name, preview_picture, uid, http_status, published_at, published_by, headers, starred_at, origin_url, archived_at, hashed_url, given_url, hashed_given_url FROM __temp__' . $this->getTable('entry', true) . '');
34 $this->addSql('DROP TABLE __temp__' . $this->getTable('entry', true) . '');
35 $this->addSql('CREATE INDEX hashed_given_url_user_id ON ' . $this->getTable('entry', true) . ' (user_id, hashed_given_url)');
36 $this->addSql('CREATE INDEX IDX_F4D18282A76ED395 ON ' . $this->getTable('entry', true) . ' (user_id)');
37 $this->addSql('CREATE INDEX hashed_url_user_id ON ' . $this->getTable('entry', true) . ' (user_id, hashed_url)');
38 $this->addSql('CREATE INDEX created_at ON ' . $this->getTable('entry', true) . ' (created_at)');
39 $this->addSql('CREATE INDEX uid ON ' . $this->getTable('entry', true) . ' (uid)');
40 }
41
42 public function down(Schema $schema): void
43 {
44 // this down() migration is auto-generated, please modify it to your needs
45 $this->skipIf('sqlite' !== $this->connection->getDatabasePlatform()->getName(), 'Migration can only be executed safely on \'sqlite\'.');
46
47 $this->addSql('DROP INDEX IDX_F4D18282A76ED395');
48 $this->addSql('DROP INDEX created_at');
49 $this->addSql('DROP INDEX uid');
50 $this->addSql('DROP INDEX hashed_url_user_id');
51 $this->addSql('DROP INDEX hashed_given_url_user_id');
52 $this->addSql('CREATE TEMPORARY TABLE __temp__' . $this->getTable('entry', true) . ' AS SELECT id, user_id, uid, title, url, hashed_url, origin_url, given_url, hashed_given_url, is_archived, archived_at, is_starred, content, created_at, updated_at, published_at, published_by, starred_at, mimetype, language, reading_time, domain_name, preview_picture, http_status, headers FROM "' . $this->getTable('entry', true) . '"');
53 $this->addSql('DROP TABLE "' . $this->getTable('entry', true) . '"');
54 $this->addSql('CREATE TABLE "' . $this->getTable('entry', true) . '" (id INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, user_id INTEGER DEFAULT NULL, uid VARCHAR(23) DEFAULT NULL, title CLOB DEFAULT NULL, url CLOB DEFAULT NULL, origin_url CLOB DEFAULT NULL, given_url CLOB DEFAULT NULL, is_archived BOOLEAN NOT NULL, archived_at DATETIME DEFAULT NULL, is_starred BOOLEAN NOT NULL, content CLOB DEFAULT NULL, created_at DATETIME NOT NULL, updated_at DATETIME NOT NULL, published_at DATETIME DEFAULT NULL, starred_at DATETIME DEFAULT NULL, mimetype CLOB DEFAULT NULL, language CLOB DEFAULT NULL, domain_name CLOB DEFAULT NULL, preview_picture CLOB DEFAULT NULL, http_status VARCHAR(3) DEFAULT NULL, hashed_url CLOB DEFAULT NULL COLLATE BINARY, hashed_given_url CLOB DEFAULT NULL COLLATE BINARY, published_by CLOB DEFAULT NULL COLLATE BINARY, reading_time INTEGER DEFAULT NULL, headers CLOB DEFAULT NULL COLLATE BINARY)');
55 $this->addSql('INSERT INTO "' . $this->getTable('entry', true) . '" (id, user_id, uid, title, url, hashed_url, origin_url, given_url, hashed_given_url, is_archived, archived_at, is_starred, content, created_at, updated_at, published_at, published_by, starred_at, mimetype, language, reading_time, domain_name, preview_picture, http_status, headers) SELECT id, user_id, uid, title, url, hashed_url, origin_url, given_url, hashed_given_url, is_archived, archived_at, is_starred, content, created_at, updated_at, published_at, published_by, starred_at, mimetype, language, reading_time, domain_name, preview_picture, http_status, headers FROM __temp__' . $this->getTable('entry', true) . '');
56 $this->addSql('DROP TABLE __temp__' . $this->getTable('entry', true) . '');
57 $this->addSql('CREATE INDEX IDX_F4D18282A76ED395 ON "' . $this->getTable('entry', true) . '" (user_id)');
58 $this->addSql('CREATE INDEX hashed_url_user_id ON "' . $this->getTable('entry', true) . '" (user_id, hashed_url)');
59 $this->addSql('CREATE INDEX hashed_given_url_user_id ON "' . $this->getTable('entry', true) . '" (user_id, hashed_given_url)');
60 $this->addSql('CREATE INDEX IDX_entry_starred ON "' . $this->getTable('entry', true) . '" (is_starred)');
61 $this->addSql('CREATE INDEX IDX_entry_archived ON "' . $this->getTable('entry', true) . '" (is_archived)');
62 $this->addSql('CREATE INDEX IDX_entry_uid ON "' . $this->getTable('entry', true) . '" (uid)');
63 $this->addSql('CREATE INDEX IDX_entry_created_at ON "' . $this->getTable('entry', true) . '" (created_at)');
64 }
65}
diff --git a/app/DoctrineMigrations/Version20190708122957.php b/app/DoctrineMigrations/Version20190708122957.php
new file mode 100644
index 00000000..9585e997
--- /dev/null
+++ b/app/DoctrineMigrations/Version20190708122957.php
@@ -0,0 +1,22 @@
1<?php
2
3namespace Application\Migrations;
4
5use Doctrine\DBAL\Schema\Schema;
6use Wallabag\CoreBundle\Doctrine\WallabagMigration;
7
8/**
9 * Change reading speed value.
10 */
11final class Version20190708122957 extends WallabagMigration
12{
13 public function up(Schema $schema): void
14 {
15 $this->addSql('UPDATE ' . $this->getTable('config', true) . ' SET reading_speed = reading_speed*200');
16 }
17
18 public function down(Schema $schema): void
19 {
20 $this->addSql('UPDATE ' . $this->getTable('config', true) . ' SET reading_speed = reading_speed/200');
21 }
22}
diff --git a/app/DoctrineMigrations/Version20190806130304.php b/app/DoctrineMigrations/Version20190806130304.php
new file mode 100644
index 00000000..8b0271b1
--- /dev/null
+++ b/app/DoctrineMigrations/Version20190806130304.php
@@ -0,0 +1,116 @@
1<?php
2
3namespace Application\Migrations;
4
5use Doctrine\DBAL\Schema\Schema;
6use Wallabag\CoreBundle\Doctrine\WallabagMigration;
7
8/**
9 * Adding more index to kill some slow queries:
10 * - user_language
11 * - user_archived
12 * - user_created
13 * - user_starred
14 * - tag_label
15 * - config_feed_token.
16 */
17final class Version20190806130304 extends WallabagMigration
18{
19 public function up(Schema $schema): void
20 {
21 switch ($this->connection->getDatabasePlatform()->getName()) {
22 case 'sqlite':
23 $this->addSql('DROP INDEX uid');
24 $this->addSql('DROP INDEX created_at');
25 $this->addSql('DROP INDEX hashed_url_user_id');
26 $this->addSql('DROP INDEX IDX_F4D18282A76ED395');
27 $this->addSql('DROP INDEX hashed_given_url_user_id');
28 $this->addSql('CREATE TEMPORARY TABLE __temp__wallabag_entry AS SELECT id, user_id, title, url, is_archived, is_starred, content, created_at, updated_at, mimetype, language, domain_name, preview_picture, uid, http_status, published_at, starred_at, origin_url, archived_at, given_url, reading_time, published_by, headers, hashed_url, hashed_given_url FROM ' . $this->getTable('entry', true));
29 $this->addSql('DROP TABLE ' . $this->getTable('entry', true));
30 $this->addSql('CREATE TABLE ' . $this->getTable('entry', true) . ' (id INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, user_id INTEGER DEFAULT NULL, title CLOB DEFAULT NULL COLLATE BINARY, url CLOB DEFAULT NULL COLLATE BINARY, is_archived BOOLEAN NOT NULL, is_starred BOOLEAN NOT NULL, content CLOB DEFAULT NULL COLLATE BINARY, created_at DATETIME NOT NULL, updated_at DATETIME NOT NULL, mimetype CLOB DEFAULT NULL COLLATE BINARY, domain_name CLOB DEFAULT NULL COLLATE BINARY, preview_picture CLOB DEFAULT NULL COLLATE BINARY, uid VARCHAR(23) DEFAULT NULL COLLATE BINARY, http_status VARCHAR(3) DEFAULT NULL COLLATE BINARY, published_at DATETIME DEFAULT NULL, starred_at DATETIME DEFAULT NULL, origin_url CLOB DEFAULT NULL COLLATE BINARY, archived_at DATETIME DEFAULT NULL, given_url CLOB DEFAULT NULL COLLATE BINARY, reading_time INTEGER NOT NULL, published_by CLOB DEFAULT NULL COLLATE BINARY --(DC2Type:array)
31 , headers CLOB DEFAULT NULL COLLATE BINARY --(DC2Type:array)
32 , hashed_url VARCHAR(40) DEFAULT NULL COLLATE BINARY, hashed_given_url VARCHAR(40) DEFAULT NULL COLLATE BINARY, language VARCHAR(20) DEFAULT NULL, CONSTRAINT FK_F4D18282A76ED395 FOREIGN KEY (user_id) REFERENCES "wallabag_user" (id) NOT DEFERRABLE INITIALLY IMMEDIATE)');
33 $this->addSql('INSERT INTO ' . $this->getTable('entry', true) . ' (id, user_id, title, url, is_archived, is_starred, content, created_at, updated_at, mimetype, language, domain_name, preview_picture, uid, http_status, published_at, starred_at, origin_url, archived_at, given_url, reading_time, published_by, headers, hashed_url, hashed_given_url) SELECT id, user_id, title, url, is_archived, is_starred, content, created_at, updated_at, mimetype, language, domain_name, preview_picture, uid, http_status, published_at, starred_at, origin_url, archived_at, given_url, reading_time, published_by, headers, hashed_url, hashed_given_url FROM __temp__wallabag_entry');
34 $this->addSql('DROP TABLE __temp__wallabag_entry');
35 $this->addSql('CREATE INDEX uid ON ' . $this->getTable('entry', true) . ' (uid)');
36 $this->addSql('CREATE INDEX created_at ON ' . $this->getTable('entry', true) . ' (created_at)');
37 $this->addSql('CREATE INDEX hashed_url_user_id ON ' . $this->getTable('entry', true) . ' (user_id, hashed_url)');
38 $this->addSql('CREATE INDEX IDX_F4D18282A76ED395 ON ' . $this->getTable('entry', true) . ' (user_id)');
39 $this->addSql('CREATE INDEX hashed_given_url_user_id ON ' . $this->getTable('entry', true) . ' (user_id, hashed_given_url)');
40 $this->addSql('CREATE INDEX user_language ON ' . $this->getTable('entry', true) . ' (language, user_id)');
41 $this->addSql('CREATE INDEX user_archived ON ' . $this->getTable('entry', true) . ' (user_id, is_archived, archived_at)');
42 $this->addSql('CREATE INDEX user_created ON ' . $this->getTable('entry', true) . ' (user_id, created_at)');
43 $this->addSql('CREATE INDEX user_starred ON ' . $this->getTable('entry', true) . ' (user_id, is_starred, starred_at)');
44 $this->addSql('CREATE INDEX tag_label ON ' . $this->getTable('tag', true) . ' (label)');
45 $this->addSql('CREATE INDEX config_feed_token ON ' . $this->getTable('config', true) . ' (feed_token)');
46 break;
47 case 'mysql':
48 $this->addSql('ALTER TABLE ' . $this->getTable('entry') . ' MODIFY language VARCHAR(20) DEFAULT NULL');
49 $this->addSql('CREATE INDEX user_language ON ' . $this->getTable('entry') . ' (language, user_id)');
50 $this->addSql('CREATE INDEX user_archived ON ' . $this->getTable('entry') . ' (user_id, is_archived, archived_at)');
51 $this->addSql('CREATE INDEX user_created ON ' . $this->getTable('entry') . ' (user_id, created_at)');
52 $this->addSql('CREATE INDEX user_starred ON ' . $this->getTable('entry') . ' (user_id, is_starred, starred_at)');
53 $this->addSql('CREATE INDEX tag_label ON ' . $this->getTable('tag') . ' (label (255))');
54 $this->addSql('CREATE INDEX config_feed_token ON ' . $this->getTable('config') . ' (feed_token (255))');
55 break;
56 case 'postgresql':
57 $this->addSql('ALTER TABLE ' . $this->getTable('entry') . ' ALTER language TYPE VARCHAR(20)');
58 $this->addSql('CREATE INDEX user_language ON ' . $this->getTable('entry') . ' (language, user_id)');
59 $this->addSql('CREATE INDEX user_archived ON ' . $this->getTable('entry') . ' (user_id, is_archived, archived_at)');
60 $this->addSql('CREATE INDEX user_created ON ' . $this->getTable('entry') . ' (user_id, created_at)');
61 $this->addSql('CREATE INDEX user_starred ON ' . $this->getTable('entry') . ' (user_id, is_starred, starred_at)');
62 $this->addSql('CREATE INDEX tag_label ON ' . $this->getTable('tag') . ' (label)');
63 $this->addSql('CREATE INDEX config_feed_token ON ' . $this->getTable('config') . ' (feed_token)');
64 break;
65 }
66 }
67
68 public function down(Schema $schema): void
69 {
70 switch ($this->connection->getDatabasePlatform()->getName()) {
71 case 'sqlite':
72 $this->addSql('DROP INDEX IDX_F4D18282A76ED395');
73 $this->addSql('DROP INDEX created_at');
74 $this->addSql('DROP INDEX uid');
75 $this->addSql('DROP INDEX hashed_url_user_id');
76 $this->addSql('DROP INDEX hashed_given_url_user_id');
77 $this->addSql('DROP INDEX user_language');
78 $this->addSql('DROP INDEX user_archived');
79 $this->addSql('DROP INDEX user_created');
80 $this->addSql('DROP INDEX user_starred');
81 $this->addSql('DROP INDEX tag_label');
82 $this->addSql('DROP INDEX config_feed_token');
83 $this->addSql('CREATE TEMPORARY TABLE __temp__wallabag_entry AS SELECT id, user_id, uid, title, url, hashed_url, origin_url, given_url, hashed_given_url, is_archived, archived_at, is_starred, content, created_at, updated_at, published_at, published_by, starred_at, mimetype, language, reading_time, domain_name, preview_picture, http_status, headers FROM ' . $this->getTable('entry', true));
84 $this->addSql('DROP TABLE ' . $this->getTable('entry', true));
85 $this->addSql('CREATE TABLE ' . $this->getTable('entry', true) . ' (id INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, user_id INTEGER DEFAULT NULL, uid VARCHAR(23) DEFAULT NULL, title CLOB DEFAULT NULL, url CLOB DEFAULT NULL, hashed_url VARCHAR(40) DEFAULT NULL, origin_url CLOB DEFAULT NULL, given_url CLOB DEFAULT NULL, hashed_given_url VARCHAR(40) DEFAULT NULL, is_archived BOOLEAN NOT NULL, archived_at DATETIME DEFAULT NULL, is_starred BOOLEAN NOT NULL, content CLOB DEFAULT NULL, created_at DATETIME NOT NULL, updated_at DATETIME NOT NULL, published_at DATETIME DEFAULT NULL, published_by CLOB DEFAULT NULL --(DC2Type:array)
86 , starred_at DATETIME DEFAULT NULL, mimetype CLOB DEFAULT NULL, reading_time INTEGER NOT NULL, domain_name CLOB DEFAULT NULL, preview_picture CLOB DEFAULT NULL, http_status VARCHAR(3) DEFAULT NULL, headers CLOB DEFAULT NULL --(DC2Type:array)
87 , language CLOB DEFAULT NULL COLLATE BINARY)');
88 $this->addSql('INSERT INTO ' . $this->getTable('entry', true) . ' (id, user_id, uid, title, url, hashed_url, origin_url, given_url, hashed_given_url, is_archived, archived_at, is_starred, content, created_at, updated_at, published_at, published_by, starred_at, mimetype, language, reading_time, domain_name, preview_picture, http_status, headers) SELECT id, user_id, uid, title, url, hashed_url, origin_url, given_url, hashed_given_url, is_archived, archived_at, is_starred, content, created_at, updated_at, published_at, published_by, starred_at, mimetype, language, reading_time, domain_name, preview_picture, http_status, headers FROM __temp__wallabag_entry');
89 $this->addSql('DROP TABLE __temp__wallabag_entry');
90 $this->addSql('CREATE INDEX IDX_F4D18282A76ED395 ON ' . $this->getTable('entry', true) . ' (user_id)');
91 $this->addSql('CREATE INDEX created_at ON ' . $this->getTable('entry', true) . ' (created_at)');
92 $this->addSql('CREATE INDEX uid ON ' . $this->getTable('entry', true) . ' (uid)');
93 $this->addSql('CREATE INDEX hashed_url_user_id ON ' . $this->getTable('entry', true) . ' (user_id, hashed_url)');
94 $this->addSql('CREATE INDEX hashed_given_url_user_id ON ' . $this->getTable('entry', true) . ' (user_id, hashed_given_url)');
95 break;
96 case 'mysql':
97 $this->addSql('ALTER TABLE ' . $this->getTable('entry') . ' MODIFY language LONGTEXT DEFAULT NULL');
98 $this->addSql('DROP INDEX user_language ON ' . $this->getTable('entry'));
99 $this->addSql('DROP INDEX user_archived ON ' . $this->getTable('entry'));
100 $this->addSql('DROP INDEX user_created ON ' . $this->getTable('entry'));
101 $this->addSql('DROP INDEX user_starred ON ' . $this->getTable('entry'));
102 $this->addSql('DROP INDEX tag_label ON ' . $this->getTable('tag'));
103 $this->addSql('DROP INDEX config_feed_token ON ' . $this->getTable('config'));
104 break;
105 case 'postgresql':
106 $this->addSql('ALTER TABLE ' . $this->getTable('entry') . ' ALTER language TYPE TEXT');
107 $this->addSql('DROP INDEX user_language ON ' . $this->getTable('entry'));
108 $this->addSql('DROP INDEX user_archived ON ' . $this->getTable('entry'));
109 $this->addSql('DROP INDEX user_created ON ' . $this->getTable('entry'));
110 $this->addSql('DROP INDEX user_starred ON ' . $this->getTable('entry'));
111 $this->addSql('DROP INDEX tag_label ON ' . $this->getTable('tag'));
112 $this->addSql('DROP INDEX config_feed_token ON ' . $this->getTable('config'));
113 break;
114 }
115 }
116}
diff --git a/app/DoctrineMigrations/Version20190808124957.php b/app/DoctrineMigrations/Version20190808124957.php
new file mode 100644
index 00000000..4e12e995
--- /dev/null
+++ b/app/DoctrineMigrations/Version20190808124957.php
@@ -0,0 +1,42 @@
1<?php
2
3namespace Application\Migrations;
4
5use Doctrine\DBAL\Schema\Schema;
6use Wallabag\CoreBundle\Doctrine\WallabagMigration;
7
8/**
9 * Change the internal setting table name.
10 */
11final class Version20190808124957 extends WallabagMigration
12{
13 public function up(Schema $schema): void
14 {
15 switch ($this->connection->getDatabasePlatform()->getName()) {
16 case 'sqlite':
17 $this->addSql('ALTER TABLE ' . $this->getTable('craue_config_setting', true) . ' RENAME TO ' . $this->getTable('internal_setting', true));
18 break;
19 case 'mysql':
20 $this->addSql('ALTER TABLE ' . $this->getTable('craue_config_setting') . ' RENAME ' . $this->getTable('internal_setting'));
21 break;
22 case 'postgresql':
23 $this->addSql('ALTER TABLE ' . $this->getTable('craue_config_setting') . ' RENAME TO ' . $this->getTable('internal_setting'));
24 break;
25 }
26 }
27
28 public function down(Schema $schema): void
29 {
30 switch ($this->connection->getDatabasePlatform()->getName()) {
31 case 'sqlite':
32 $this->addSql('ALTER TABLE ' . $this->getTable('internal_setting', true) . ' RENAME TO ' . $this->getTable('craue_config_setting', true));
33 break;
34 case 'mysql':
35 $this->addSql('ALTER TABLE ' . $this->getTable('internal_setting') . ' RENAME ' . $this->getTable('craue_config_setting'));
36 break;
37 case 'postgresql':
38 $this->addSql('ALTER TABLE ' . $this->getTable('internal_setting') . ' RENAME TO ' . $this->getTable('craue_config_setting'));
39 break;
40 }
41 }
42}
diff --git a/app/Resources/static/themes/_global/index.js b/app/Resources/static/themes/_global/index.js
index ae598e56..88365270 100644
--- a/app/Resources/static/themes/_global/index.js
+++ b/app/Resources/static/themes/_global/index.js
@@ -4,6 +4,9 @@ import $ from 'jquery';
4/* Annotations */ 4/* Annotations */
5import annotator from 'annotator'; 5import annotator from 'annotator';
6 6
7import ClipboardJS from 'clipboard';
8import 'mathjax/es5/tex-svg';
9
7/* Fonts */ 10/* Fonts */
8import 'material-design-icons-iconfont/dist/material-design-icons.css'; 11import 'material-design-icons-iconfont/dist/material-design-icons.css';
9import 'lato-font/css/lato-font.css'; 12import 'lato-font/css/lato-font.css';
@@ -70,4 +73,47 @@ $(document).ready(() => {
70 retrievePercent(x.entryId, true); 73 retrievePercent(x.entryId, true);
71 }); 74 });
72 } 75 }
76
77 document.querySelectorAll('[data-handler=tag-rename]').forEach((item) => {
78 const current = item;
79 current.wallabag_edit_mode = false;
80 current.onclick = (event) => {
81 const target = event.currentTarget;
82
83 if (target.wallabag_edit_mode === false) {
84 $(target.parentNode.querySelector('[data-handle=tag-link]')).addClass('hidden');
85 $(target.parentNode.querySelector('[data-handle=tag-rename-form]')).removeClass('hidden');
86 target.parentNode.querySelector('[data-handle=tag-rename-form] input').focus();
87 target.querySelector('.material-icons').innerHTML = 'done';
88
89 target.wallabag_edit_mode = true;
90 } else {
91 target.parentNode.querySelector('[data-handle=tag-rename-form]').submit();
92 }
93 };
94 });
95
96 // mimic radio button because emailTwoFactor is a boolean
97 $('#update_user_googleTwoFactor').on('change', () => {
98 $('#update_user_emailTwoFactor').prop('checked', false);
99 });
100
101 $('#update_user_emailTwoFactor').on('change', () => {
102 $('#update_user_googleTwoFactor').prop('checked', false);
103 });
104
105 // same mimic for super admin
106 $('#user_googleTwoFactor').on('change', () => {
107 $('#user_emailTwoFactor').prop('checked', false);
108 });
109
110 $('#user_emailTwoFactor').on('change', () => {
111 $('#user_googleTwoFactor').prop('checked', false);
112 });
113
114 // handle copy to clipboard for developer stuff
115 const clipboard = new ClipboardJS('.btn');
116 clipboard.on('success', (e) => {
117 e.clearSelection();
118 });
73}); 119});
diff --git a/app/Resources/static/themes/baggy/css/article.scss b/app/Resources/static/themes/baggy/css/article.scss
index 9094ad55..d203ce31 100644
--- a/app/Resources/static/themes/baggy/css/article.scss
+++ b/app/Resources/static/themes/baggy/css/article.scss
@@ -85,7 +85,7 @@ blockquote {
85 color: #999; 85 color: #999;
86} 86}
87 87
88.icon-rss { 88.icon-feed {
89 background-color: #000; 89 background-color: #000;
90 color: #fff; 90 color: #fff;
91 padding: 0.2em 0.5em; 91 padding: 0.2em 0.5em;
@@ -101,8 +101,8 @@ blockquote {
101 margin-bottom: 0.5em; 101 margin-bottom: 0.5em;
102 } 102 }
103 103
104 .icon-rss:hover, 104 .icon-feed:hover,
105 .icon-rss:focus { 105 .icon-feed:focus {
106 background-color: #fff; 106 background-color: #fff;
107 color: #000; 107 color: #000;
108 text-decoration: none; 108 text-decoration: none;
diff --git a/app/Resources/static/themes/baggy/css/layout.scss b/app/Resources/static/themes/baggy/css/layout.scss
index cb14e62d..0293ebe5 100644
--- a/app/Resources/static/themes/baggy/css/layout.scss
+++ b/app/Resources/static/themes/baggy/css/layout.scss
@@ -295,6 +295,15 @@ div.pagination ul {
295 } 295 }
296} 296}
297 297
298.hide { 298.card-tag-form {
299 display: inline-block;
300}
301
302.card-tag-form input[type="text"] {
303 min-width: 20em;
304}
305
306.hide,
307.hidden {
299 display: none; 308 display: none;
300} 309}
diff --git a/app/Resources/static/themes/baggy/css/media_queries.scss b/app/Resources/static/themes/baggy/css/media_queries.scss
index c33db0b3..a08f369f 100755
--- a/app/Resources/static/themes/baggy/css/media_queries.scss
+++ b/app/Resources/static/themes/baggy/css/media_queries.scss
@@ -170,3 +170,9 @@
170 width: 100%; 170 width: 100%;
171 } 171 }
172} 172}
173
174@media only print {
175 header h1.logo {
176 display: none;
177 }
178}
diff --git a/app/Resources/static/themes/baggy/css/pictos.scss b/app/Resources/static/themes/baggy/css/pictos.scss
index 2ff01937..b6ebf311 100644
--- a/app/Resources/static/themes/baggy/css/pictos.scss
+++ b/app/Resources/static/themes/baggy/css/pictos.scss
@@ -136,7 +136,7 @@
136 content: "\ea3a"; 136 content: "\ea3a";
137} 137}
138 138
139.icon-rss::before { 139.icon-feed::before {
140 content: "\e808"; 140 content: "\e808";
141} 141}
142 142
diff --git a/app/Resources/static/themes/material/css/article.scss b/app/Resources/static/themes/material/css/article.scss
index 75658a58..755372c9 100644
--- a/app/Resources/static/themes/material/css/article.scss
+++ b/app/Resources/static/themes/material/css/article.scss
@@ -5,6 +5,7 @@
5#article { 5#article {
6 font-size: 20px; 6 font-size: 20px;
7 margin: 0 auto; 7 margin: 0 auto;
8 padding-bottom: 80px;
8 max-width: 45em; 9 max-width: 45em;
9 10
10 article { 11 article {
@@ -172,18 +173,18 @@
172 &:hover { 173 &:hover {
173 width: 260px !important; 174 width: 260px !important;
174 175
175 .collapsible-body {
176 height: auto;
177
178 li a i.material-icons {
179 margin: auto 5px auto -8px;
180 }
181 }
182
183 span { 176 span {
184 opacity: 1; 177 opacity: 1;
185 } 178 }
186 } 179 }
180
181 .collapsible-body {
182 height: auto;
183
184 li a i.material-icons {
185 margin: auto 5px auto -8px;
186 }
187 }
187} 188}
188 189
189.progress { 190.progress {
diff --git a/app/Resources/static/themes/material/css/cards.scss b/app/Resources/static/themes/material/css/cards.scss
index 4f67e038..9ae1be82 100644
--- a/app/Resources/static/themes/material/css/cards.scss
+++ b/app/Resources/static/themes/material/css/cards.scss
@@ -18,6 +18,24 @@ main {
18 overflow: hidden; 18 overflow: hidden;
19} 19}
20 20
21@mixin mixin-reading-time {
22 .reading-time {
23 display: inline-flex;
24 vertical-align: middle;
25
26 .card-reading-time,
27 .card-created-at {
28 display: inline-flex;
29 }
30
31 span {
32 margin-right: 5px;
33 }
34
35 @content;
36 }
37}
38
21.card { 39.card {
22 .card-content .card-title, 40 .card-content .card-title,
23 .card-reveal .card-title { 41 .card-reveal .card-title {
@@ -98,14 +116,7 @@ main {
98 margin-right: 5px !important; 116 margin-right: 5px !important;
99 } 117 }
100 118
101 .reading-time { 119 @include mixin-reading-time;
102 display: inline-flex;
103 vertical-align: middle;
104
105 span {
106 margin-right: 5px;
107 }
108 }
109 } 120 }
110 121
111 .card-image { 122 .card-image {
@@ -186,6 +197,17 @@ a.original:not(.waves-effect) {
186 flex-grow: 1; 197 flex-grow: 1;
187} 198}
188 199
200.card-tag-form {
201 display: flex;
202 min-width: 100px;
203 flex-grow: 1;
204}
205
206.card-tag-form input {
207 margin-bottom: 0;
208 height: 2rem;
209}
210
189.card-tag-rss { 211.card-tag-rss {
190 display: flex; 212 display: flex;
191} 213}
@@ -219,10 +241,18 @@ a.original:not(.waves-effect) {
219 } 241 }
220 242
221 div.metadata { 243 div.metadata {
244 overflow: hidden;
245 height: 1.5em;
246 display: flex;
247
248 ul.tags {
249 margin-left: 4px;
250 }
251
222 .chip { 252 .chip {
223 background-color: $blueAccentColor; 253 background-color: $blueAccentColor;
224 padding: 0 7px; 254 padding: 0 7px;
225 margin: auto 2px; 255 margin: auto 1px;
226 border-radius: 6px; 256 border-radius: 6px;
227 line-height: 22px; 257 line-height: 22px;
228 height: 22px; 258 height: 22px;
@@ -239,6 +269,16 @@ a.original:not(.waves-effect) {
239 padding-left: 8px; 269 padding-left: 8px;
240 } 270 }
241 } 271 }
272
273 @include mixin-reading-time {
274 padding: 0 5px;
275 flex-wrap: wrap;
276 margin-left: auto;
277
278 i.material-icons {
279 font-size: 20px;
280 }
281 }
242 } 282 }
243 283
244 div.card-content { 284 div.card-content {
@@ -272,9 +312,3 @@ a.original:not(.waves-effect) {
272.settings .div_tabs { 312.settings .div_tabs {
273 padding-bottom: 15px; 313 padding-bottom: 15px;
274} 314}
275
276@media only screen and (min-width: 992px) {
277 .card-tag-labels li {
278 max-width: 50%;
279 }
280}
diff --git a/app/Resources/static/themes/material/css/media_queries.scss b/app/Resources/static/themes/material/css/media_queries.scss
index 72584426..4242ead2 100644
--- a/app/Resources/static/themes/material/css/media_queries.scss
+++ b/app/Resources/static/themes/material/css/media_queries.scss
@@ -12,6 +12,16 @@
12 .pagination { 12 .pagination {
13 margin-left: auto; 13 margin-left: auto;
14 } 14 }
15
16 .card-tag-labels li {
17 max-width: 50%;
18 }
19}
20
21@media screen and (min-width: 993px) {
22 body.entry main #content {
23 padding-left: 70px;
24 }
15} 25}
16 26
17@media only screen and (max-width: 992px) { 27@media only screen and (max-width: 992px) {
@@ -163,4 +173,23 @@
163 .row .col { 173 .row .col {
164 padding: 0; 174 padding: 0;
165 } 175 }
176
177 .card-stacked div.metadata .reading-time {
178 display: none;
179 }
180}
181
182@media screen and (max-width: 310px),
183 screen and (min-width: 601px) and (max-width: 660px),
184 screen and (min-width: 993px) and (max-width: 1050px),
185 screen and (min-width: 1201px) and (max-width: 1250px) {
186 .card .card-action .reading-time .card-created-at {
187 display: none;
188 }
189}
190
191@media only print {
192 body {
193 display: block;
194 }
166} 195}
diff --git a/app/Resources/static/themes/material/css/nav.scss b/app/Resources/static/themes/material/css/nav.scss
index 147f163f..b7288278 100644
--- a/app/Resources/static/themes/material/css/nav.scss
+++ b/app/Resources/static/themes/material/css/nav.scss
@@ -131,6 +131,11 @@ nav {
131 display: none; 131 display: none;
132} 132}
133 133
134.entry-nav-top--sticky {
135 position: sticky;
136 top: 0;
137}
138
134@media (min-width: 993px) { 139@media (min-width: 993px) {
135 .button-collapse { 140 .button-collapse {
136 display: none; 141 display: none;
diff --git a/app/Resources/static/themes/material/index.js b/app/Resources/static/themes/material/index.js
index 96310d81..e808d75c 100755
--- a/app/Resources/static/themes/material/index.js
+++ b/app/Resources/static/themes/material/index.js
@@ -8,7 +8,7 @@ import 'materialize-css/dist/js/materialize';
8import '../_global/index'; 8import '../_global/index';
9 9
10/* Tools */ 10/* Tools */
11import { initExport, initFilters } from './js/tools'; 11import { initExport, initFilters, initRandom } from './js/tools';
12 12
13/* Import shortcuts */ 13/* Import shortcuts */
14import './js/shortcuts/main'; 14import './js/shortcuts/main';
@@ -17,6 +17,36 @@ import './js/shortcuts/entry';
17/* Theme style */ 17/* Theme style */
18import './css/index.scss'; 18import './css/index.scss';
19 19
20const stickyNav = () => {
21 const nav = $('.js-entry-nav-top');
22 $('[data-toggle="actions"]').click(() => {
23 nav.toggleClass('entry-nav-top--sticky');
24 });
25};
26
27const articleScroll = () => {
28 const articleEl = $('#article');
29 if (articleEl.length > 0) {
30 $(window).scroll(() => {
31 const s = $(window).scrollTop();
32 const d = $(document).height();
33 const c = $(window).height();
34 const articleElBottom = articleEl.offset().top + articleEl.height();
35 const scrollPercent = (s / (d - c)) * 100;
36 $('.progress .determinate').css('width', `${scrollPercent}%`);
37 const fixedActionBtn = $('.js-fixed-action-btn');
38 const toggleScrollDataName = 'toggle-auto';
39 if ((s + c) > articleElBottom) {
40 fixedActionBtn.data(toggleScrollDataName, true);
41 fixedActionBtn.openFAB();
42 } else if (fixedActionBtn.data(toggleScrollDataName) === true) {
43 fixedActionBtn.data(toggleScrollDataName, false);
44 fixedActionBtn.closeFAB();
45 }
46 });
47 }
48};
49
20$(document).ready(() => { 50$(document).ready(() => {
21 // sideNav 51 // sideNav
22 $('.button-collapse').sideNav(); 52 $('.button-collapse').sideNav();
@@ -32,8 +62,12 @@ $(document).ready(() => {
32 format: 'dd/mm/yyyy', 62 format: 'dd/mm/yyyy',
33 container: 'body', 63 container: 'body',
34 }); 64 });
65
35 initFilters(); 66 initFilters();
36 initExport(); 67 initExport();
68 initRandom();
69 stickyNav();
70 articleScroll();
37 71
38 const toggleNav = (toShow, toFocus) => { 72 const toggleNav = (toShow, toFocus) => {
39 $('.nav-panel-actions').hide(100); 73 $('.nav-panel-actions').hide(100);
@@ -48,30 +82,27 @@ $(document).ready(() => {
48 $('#tag_label').focus(); 82 $('#tag_label').focus();
49 return false; 83 return false;
50 }); 84 });
85
51 $('#nav-btn-add').on('click', () => { 86 $('#nav-btn-add').on('click', () => {
52 toggleNav('.nav-panel-add', '#entry_url'); 87 toggleNav('.nav-panel-add', '#entry_url');
53 return false; 88 return false;
54 }); 89 });
90
55 const materialAddForm = $('.nav-panel-add'); 91 const materialAddForm = $('.nav-panel-add');
56 materialAddForm.on('submit', () => { 92 materialAddForm.on('submit', () => {
57 materialAddForm.addClass('disabled'); 93 materialAddForm.addClass('disabled');
58 $('input#entry_url', materialAddForm).prop('readonly', true).trigger('blur'); 94 $('input#entry_url', materialAddForm).prop('readonly', true).trigger('blur');
59 }); 95 });
96
60 $('#nav-btn-search').on('click', () => { 97 $('#nav-btn-search').on('click', () => {
61 toggleNav('.nav-panel-search', '#search_entry_term'); 98 toggleNav('.nav-panel-search', '#search_entry_term');
62 return false; 99 return false;
63 }); 100 });
101
64 $('.close').on('click', (e) => { 102 $('.close').on('click', (e) => {
65 $(e.target).parent('.nav-panel-item').hide(100); 103 $(e.target).parent('.nav-panel-item').hide(100);
66 $('.nav-panel-actions').show(100); 104 $('.nav-panel-actions').show(100);
67 $('.nav-panels').css('background', 'transparent'); 105 $('.nav-panels').css('background', 'transparent');
68 return false; 106 return false;
69 }); 107 });
70 $(window).scroll(() => {
71 const s = $(window).scrollTop();
72 const d = $(document).height();
73 const c = $(window).height();
74 const scrollPercent = (s / (d - c)) * 100;
75 $('.progress .determinate').css('width', `${scrollPercent}%`);
76 });
77}); 108});
diff --git a/app/Resources/static/themes/material/js/tools.js b/app/Resources/static/themes/material/js/tools.js
index 39398fd8..0b3d3038 100644
--- a/app/Resources/static/themes/material/js/tools.js
+++ b/app/Resources/static/themes/material/js/tools.js
@@ -8,6 +8,7 @@ function initFilters() {
8 $('#clear_form_filters').on('click', () => { 8 $('#clear_form_filters').on('click', () => {
9 $('#filters input').val(''); 9 $('#filters input').val('');
10 $('#filters :checked').removeAttr('checked'); 10 $('#filters :checked').removeAttr('checked');
11
11 return false; 12 return false;
12 }); 13 });
13 } 14 }
@@ -21,4 +22,15 @@ function initExport() {
21 } 22 }
22} 23}
23 24
24export { initExport, initFilters }; 25function initRandom() {
26 // no display if export (ie: entries) not available
27 if ($('div').is('#export')) {
28 $('#button_random').show();
29 }
30}
31
32export {
33 initExport,
34 initFilters,
35 initRandom,
36};
diff --git a/app/autoload.php b/app/autoload.php
deleted file mode 100644
index c5f664dc..00000000
--- a/app/autoload.php
+++ /dev/null
@@ -1,13 +0,0 @@
1<?php
2
3use Composer\Autoload\ClassLoader;
4use Doctrine\Common\Annotations\AnnotationRegistry;
5
6/**
7 * @var ClassLoader
8 */
9$loader = require __DIR__ . '/../vendor/autoload.php';
10
11AnnotationRegistry::registerLoader([$loader, 'loadClass']);
12
13return $loader;
diff --git a/app/config/config.yml b/app/config/config.yml
index 0c2b6a1d..0b325afe 100644
--- a/app/config/config.yml
+++ b/app/config/config.yml
@@ -46,7 +46,6 @@ twig:
46doctrine: 46doctrine:
47 dbal: 47 dbal:
48 driver: "%database_driver%" 48 driver: "%database_driver%"
49 driver_class: "%database_driver_class%"
50 host: "%database_host%" 49 host: "%database_host%"
51 port: "%database_port%" 50 port: "%database_port%"
52 dbname: "%database_name%" 51 dbname: "%database_name%"
@@ -55,7 +54,6 @@ doctrine:
55 charset: "%database_charset%" 54 charset: "%database_charset%"
56 path: "%database_path%" 55 path: "%database_path%"
57 unix_socket: "%database_socket%" 56 unix_socket: "%database_socket%"
58 server_version: 5.6
59 57
60 orm: 58 orm:
61 auto_generate_proxy_classes: "%kernel.debug%" 59 auto_generate_proxy_classes: "%kernel.debug%"
@@ -79,10 +77,13 @@ doctrine_migrations:
79 77
80# Swiftmailer Configuration 78# Swiftmailer Configuration
81swiftmailer: 79swiftmailer:
82 transport: "%mailer_transport%" 80 transport: "%mailer_transport%"
83 host: "%mailer_host%" 81 username: "%mailer_user%"
84 username: "%mailer_user%" 82 password: "%mailer_password%"
85 password: "%mailer_password%" 83 host: "%mailer_host%"
84 port: "%mailer_port%"
85 encryption: "%mailer_encryption%"
86 auth_mode: "%mailer_auth_mode%"
86 spool: 87 spool:
87 type: memory 88 type: memory
88 89
@@ -147,18 +148,18 @@ nelmio_cors:
147 paths: 148 paths:
148 '^/api/': 149 '^/api/':
149 allow_origin: ['*'] 150 allow_origin: ['*']
150 allow_headers: ['X-Custom-Auth'] 151 allow_headers: ['Authorization','content-type']
151 allow_methods: ['POST', 'PUT', 'PATCH','GET', 'DELETE'] 152 allow_methods: ['POST', 'PUT', 'PATCH','GET', 'DELETE']
152 max_age: 3600 153 max_age: 3600
153 '^/oauth/': 154 '^/oauth/':
154 allow_origin: ['*'] 155 allow_origin: ['*']
155 allow_headers: ['X-Custom-Auth'] 156 allow_headers: ['Authorization','content-type']
156 allow_methods: ['POST', 'PUT', 'GET', 'DELETE'] 157 allow_methods: ['POST', 'PUT', 'GET', 'DELETE']
157 max_age: 3600 158 max_age: 3600
158 '^/': 159 '^/':
159 #origin_regex: true 160 #origin_regex: true
160 allow_origin: ['^http://localhost:[0-9]+'] 161 allow_origin: ['*']
161 allow_headers: ['X-Custom-Auth'] 162 allow_headers: ['Authorization','content-type']
162 allow_methods: ['POST', 'PUT', 'GET', 'DELETE'] 163 allow_methods: ['POST', 'PUT', 'GET', 'DELETE']
163 max_age: 3600 164 max_age: 3600
164 hosts: ['^api\.'] 165 hosts: ['^api\.']
@@ -197,10 +198,17 @@ fos_oauth_server:
197 refresh_token_lifetime: 1209600 198 refresh_token_lifetime: 1209600
198 199
199scheb_two_factor: 200scheb_two_factor:
200 trusted_computer: 201 trusted_device:
201 enabled: true 202 enabled: true
202 cookie_name: wllbg_trusted_computer 203 cookie_name: wllbg_trusted_computer
203 cookie_lifetime: 2592000 204 lifetime: 2592000
205
206 backup_codes:
207 enabled: "%twofactor_auth%"
208
209 google:
210 enabled: "%twofactor_auth%"
211 template: WallabagUserBundle:Authentication:form.html.twig
204 212
205 email: 213 email:
206 enabled: "%twofactor_auth%" 214 enabled: "%twofactor_auth%"
@@ -253,6 +261,11 @@ old_sound_rabbit_mq:
253 exchange_options: 261 exchange_options:
254 name: 'wallabag.import.wallabag_v2' 262 name: 'wallabag.import.wallabag_v2'
255 type: topic 263 type: topic
264 import_elcurator:
265 connection: default
266 exchange_options:
267 name: 'wallabag.import.elcurator'
268 type: topic
256 import_firefox: 269 import_firefox:
257 connection: default 270 connection: default
258 exchange_options: 271 exchange_options:
@@ -318,6 +331,15 @@ old_sound_rabbit_mq:
318 name: 'wallabag.import.wallabag_v2' 331 name: 'wallabag.import.wallabag_v2'
319 callback: wallabag_import.consumer.amqp.wallabag_v2 332 callback: wallabag_import.consumer.amqp.wallabag_v2
320 qos_options: {prefetch_count: "%rabbitmq_prefetch_count%"} 333 qos_options: {prefetch_count: "%rabbitmq_prefetch_count%"}
334 import_elcurator:
335 connection: default
336 exchange_options:
337 name: 'wallabag.import.elcurator'
338 type: topic
339 queue_options:
340 name: 'wallabag.import.elcurator'
341 callback: wallabag_import.consumer.amqp.elcurator
342 qos_options: {prefetch_count: "%rabbitmq_prefetch_count%"}
321 import_firefox: 343 import_firefox:
322 connection: default 344 connection: default
323 exchange_options: 345 exchange_options:
@@ -357,3 +379,34 @@ jms_serializer:
357 # see: https://github.com/schmittjoh/JMSSerializerBundle/pull/494 379 # see: https://github.com/schmittjoh/JMSSerializerBundle/pull/494
358 datetime: 380 datetime:
359 default_format: "Y-m-d\\TH:i:sO" # ATOM 381 default_format: "Y-m-d\\TH:i:sO" # ATOM
382
383# see https://github.com/symfony/symfony-standard/pull/1133
384sensio_framework_extra:
385 router:
386 annotations: false
387
388httplug:
389 clients:
390 wallabag_core:
391 factory: 'wallabag_core.http_client_factory'
392 config:
393 defaults:
394 timeout: 10
395 plugins: ['httplug.plugin.logger']
396 wallabag_core.entry.download_images:
397 factory: 'httplug.factory.auto'
398 plugins: ['httplug.plugin.logger']
399 wallabag_import.pocket.client:
400 factory: 'httplug.factory.auto'
401 plugins:
402 - 'httplug.plugin.logger'
403 - header_defaults:
404 headers:
405 'content-type': 'application/json'
406 'X-Accept': 'application/json'
407 discovery:
408 client: false
409
410# define custom entity so we can override length attribute to fix utf8mb4 issue
411craue_config:
412 entity_name: Wallabag\CoreBundle\Entity\InternalSetting
diff --git a/app/config/config_dev.yml b/app/config/config_dev.yml
index 0c490575..fa6e14e7 100644
--- a/app/config/config_dev.yml
+++ b/app/config/config_dev.yml
@@ -36,7 +36,7 @@ monolog:
36 channels: [doctrine] 36 channels: [doctrine]
37 37
38swiftmailer: 38swiftmailer:
39 # see http://mailcatcher.me/ 39 # see https://mailcatcher.me/
40 transport: smtp 40 transport: smtp
41 host: 'localhost' 41 host: 'localhost'
42 port: 1025 42 port: 1025
diff --git a/app/config/config_prod.yml b/app/config/config_prod.yml
index 44e29aac..59d2e9e2 100644
--- a/app/config/config_prod.yml
+++ b/app/config/config_prod.yml
@@ -23,3 +23,6 @@ monolog:
23 level: debug 23 level: debug
24 console: 24 console:
25 type: console 25 type: console
26
27sentry:
28 dsn: "%sentry_dsn%"
diff --git a/app/config/config_test.yml b/app/config/config_test.yml
index fc067ff4..216f8431 100644
--- a/app/config/config_test.yml
+++ b/app/config/config_test.yml
@@ -1,6 +1,7 @@
1imports: 1imports:
2 - { resource: config_dev.yml } 2 - { resource: config_dev.yml }
3 - { resource: parameters_test.yml } 3 - { resource: parameters_test.yml }
4 - { resource: services_test.yml }
4 5
5framework: 6framework:
6 test: ~ 7 test: ~
@@ -23,7 +24,6 @@ swiftmailer:
23doctrine: 24doctrine:
24 dbal: 25 dbal:
25 driver: "%test_database_driver%" 26 driver: "%test_database_driver%"
26 driver_class: "%test_database_driver_class%"
27 host: "%test_database_host%" 27 host: "%test_database_host%"
28 port: "%test_database_port%" 28 port: "%test_database_port%"
29 dbname: "%test_database_name%" 29 dbname: "%test_database_name%"
diff --git a/app/config/parameters.yml.dist b/app/config/parameters.yml.dist
index 6b0cb8e8..9948fa46 100644
--- a/app/config/parameters.yml.dist
+++ b/app/config/parameters.yml.dist
@@ -11,8 +11,6 @@ parameters:
11 # database_password: %env.database_password% 11 # database_password: %env.database_password%
12 12
13 database_driver: pdo_mysql 13 database_driver: pdo_mysql
14 database_driver_class: ~
15 # database_driver_class: Wallabag\CoreBundle\Doctrine\DBAL\Driver\CustomPostgreSQLDriver
16 database_host: 127.0.0.1 14 database_host: 127.0.0.1
17 database_port: ~ 15 database_port: ~
18 database_name: wallabag 16 database_name: wallabag
@@ -27,15 +25,18 @@ parameters:
27 25
28 domain_name: https://your-wallabag-url-instance.com 26 domain_name: https://your-wallabag-url-instance.com
29 27
30 mailer_transport: smtp 28 mailer_transport: smtp
31 mailer_host: 127.0.0.1 29 mailer_user: ~
32 mailer_user: ~ 30 mailer_password: ~
33 mailer_password: ~ 31 mailer_host: 127.0.0.1
32 mailer_port: false
33 mailer_encryption: ~
34 mailer_auth_mode: ~
34 35
35 locale: en 36 locale: en
36 37
37 # A secret key that's used to generate certain security-related tokens 38 # A secret key that's used to generate certain security-related tokens
38 secret: ovmpmAWXRCabNlMgzlzFXDYmCFfzGv 39 secret: CHANGE_ME_TO_SOMETHING_SECRET_AND_RANDOM
39 40
40 # two factor stuff 41 # two factor stuff
41 twofactor_auth: true 42 twofactor_auth: true
@@ -62,3 +63,6 @@ parameters:
62 redis_port: 6379 63 redis_port: 6379
63 redis_path: null 64 redis_path: null
64 redis_password: null 65 redis_password: null
66
67 # sentry logging
68 sentry_dsn: ~
diff --git a/app/config/parameters_test.yml b/app/config/parameters_test.yml
index 64e51976..257d2ace 100644
--- a/app/config/parameters_test.yml
+++ b/app/config/parameters_test.yml
@@ -8,4 +8,3 @@ parameters:
8 test_database_path: "%env(TEST_DATABASE_PATH)%" 8 test_database_path: "%env(TEST_DATABASE_PATH)%"
9 env(TEST_DATABASE_PATH): "%kernel.project_dir%/data/db/wallabag_test.sqlite" 9 env(TEST_DATABASE_PATH): "%kernel.project_dir%/data/db/wallabag_test.sqlite"
10 test_database_charset: utf8 10 test_database_charset: utf8
11 test_database_driver_class: ~
diff --git a/app/config/routing.yml b/app/config/routing.yml
index 0bd2d130..d4defca0 100644
--- a/app/config/routing.yml
+++ b/app/config/routing.yml
@@ -51,3 +51,47 @@ craue_config_settings_modify:
51 51
52fos_js_routing: 52fos_js_routing:
53 resource: "@FOSJsRoutingBundle/Resources/config/routing/routing.xml" 53 resource: "@FOSJsRoutingBundle/Resources/config/routing/routing.xml"
54
552fa_login:
56 path: /2fa
57 defaults:
58 _controller: "scheb_two_factor.form_controller:form"
59
602fa_login_check:
61 path: /2fa_check
62
63# redirect RSS feed to Atom
64rss_to_atom_unread:
65 path: /{username}/{token}/unread.xml
66 defaults:
67 _controller: FrameworkBundle:Redirect:redirect
68 route: unread_feed
69 permanent: true
70
71rss_to_atom_archive:
72 path: /{username}/{token}/archive.xml
73 defaults:
74 _controller: FrameworkBundle:Redirect:redirect
75 route: archive_feed
76 permanent: true
77
78rss_to_atom_starred:
79 path: /{username}/{token}/starred.xml
80 defaults:
81 _controller: FrameworkBundle:Redirect:redirect
82 route: starred_feed
83 permanent: true
84
85rss_to_atom_all:
86 path: /{username}/{token}/all.xml
87 defaults:
88 _controller: FrameworkBundle:Redirect:redirect
89 route: all_feed
90 permanent: true
91
92rss_to_atom_tags:
93 path: /{username}/{token}/tags/{slug}.xml
94 defaults:
95 _controller: FrameworkBundle:Redirect:redirect
96 route: tag_feed
97 permanent: true
diff --git a/app/config/security.yml b/app/config/security.yml
index 02afc9ea..760b2550 100644
--- a/app/config/security.yml
+++ b/app/config/security.yml
@@ -31,12 +31,15 @@ security:
31 fos_oauth: true 31 fos_oauth: true
32 stateless: true 32 stateless: true
33 anonymous: true 33 anonymous: true
34 provider: fos_userbundle
34 35
35 login_firewall: 36 login_firewall:
37 logout_on_user_change: true
36 pattern: ^/login$ 38 pattern: ^/login$
37 anonymous: ~ 39 anonymous: ~
38 40
39 secured_area: 41 secured_area:
42 logout_on_user_change: true
40 pattern: ^/ 43 pattern: ^/
41 form_login: 44 form_login:
42 provider: fos_userbundle 45 provider: fos_userbundle
@@ -53,17 +56,27 @@ security:
53 path: /logout 56 path: /logout
54 target: / 57 target: /
55 58
59 two_factor:
60 provider: fos_userbundle
61 auth_form_path: 2fa_login
62 check_path: 2fa_login_check
63
56 access_control: 64 access_control:
57 - { path: ^/api/doc, roles: IS_AUTHENTICATED_ANONYMOUSLY } 65 - { path: ^/api/(doc|version|info|user), roles: IS_AUTHENTICATED_ANONYMOUSLY }
58 - { path: ^/api/version, roles: IS_AUTHENTICATED_ANONYMOUSLY }
59 - { path: ^/api/user, roles: IS_AUTHENTICATED_ANONYMOUSLY }
60 - { path: ^/login, roles: IS_AUTHENTICATED_ANONYMOUSLY } 66 - { path: ^/login, roles: IS_AUTHENTICATED_ANONYMOUSLY }
67 # force role for logout otherwise when 2fa enable, you won't be able to logout
68 # https://github.com/scheb/two-factor-bundle/issues/168#issuecomment-430822478
69 - { path: ^/logout, roles: [IS_AUTHENTICATED_ANONYMOUSLY, IS_AUTHENTICATED_2FA_IN_PROGRESS] }
61 - { path: ^/register, role: IS_AUTHENTICATED_ANONYMOUSLY } 70 - { path: ^/register, role: IS_AUTHENTICATED_ANONYMOUSLY }
62 - { path: ^/resetting, role: IS_AUTHENTICATED_ANONYMOUSLY } 71 - { path: ^/resetting, role: IS_AUTHENTICATED_ANONYMOUSLY }
63 - { path: /(unread|starred|archive|all).xml$, roles: IS_AUTHENTICATED_ANONYMOUSLY } 72 - { path: /(unread|starred|archive|all).xml$, roles: IS_AUTHENTICATED_ANONYMOUSLY }
73 - { path: ^/locale, role: IS_AUTHENTICATED_ANONYMOUSLY }
64 - { path: /tags/(.*).xml$, roles: IS_AUTHENTICATED_ANONYMOUSLY } 74 - { path: /tags/(.*).xml$, roles: IS_AUTHENTICATED_ANONYMOUSLY }
75 - { path: ^/feed, roles: IS_AUTHENTICATED_ANONYMOUSLY }
76 - { path: /(unread|starred|archive).xml$, roles: IS_AUTHENTICATED_ANONYMOUSLY } # For backwards compatibility
65 - { path: ^/share, roles: IS_AUTHENTICATED_ANONYMOUSLY } 77 - { path: ^/share, roles: IS_AUTHENTICATED_ANONYMOUSLY }
66 - { path: ^/settings, roles: ROLE_SUPER_ADMIN } 78 - { path: ^/settings, roles: ROLE_SUPER_ADMIN }
67 - { path: ^/annotations, roles: ROLE_USER } 79 - { path: ^/annotations, roles: ROLE_USER }
80 - { path: ^/2fa, role: IS_AUTHENTICATED_2FA_IN_PROGRESS }
68 - { path: ^/users, roles: ROLE_SUPER_ADMIN } 81 - { path: ^/users, roles: ROLE_SUPER_ADMIN }
69 - { path: ^/, roles: ROLE_USER } 82 - { path: ^/, roles: ROLE_USER }
diff --git a/app/config/services.yml b/app/config/services.yml
index 7b85d846..25bbe5dc 100644
--- a/app/config/services.yml
+++ b/app/config/services.yml
@@ -2,12 +2,6 @@ parameters:
2 lexik_form_filter.get_filter.doctrine_orm.class: Wallabag\CoreBundle\Event\Subscriber\CustomDoctrineORMSubscriber 2 lexik_form_filter.get_filter.doctrine_orm.class: Wallabag\CoreBundle\Event\Subscriber\CustomDoctrineORMSubscriber
3 3
4services: 4services:
5 # used for tests
6 filesystem_cache:
7 class: Doctrine\Common\Cache\FilesystemCache
8 arguments:
9 - "%kernel.cache_dir%/doctrine/metadata"
10
11 twig.extension.text: 5 twig.extension.text:
12 class: Twig_Extensions_Extension_Text 6 class: Twig_Extensions_Extension_Text
13 tags: 7 tags:
diff --git a/app/config/services_test.yml b/app/config/services_test.yml
new file mode 100644
index 00000000..1b3aff63
--- /dev/null
+++ b/app/config/services_test.yml
@@ -0,0 +1,38 @@
1services:
2 # see https://github.com/symfony/symfony/issues/24543
3 fos_user.user_manager.test:
4 alias: fos_user.user_manager
5 public: true
6
7 fos_user.security.login_manager.test:
8 alias: fos_user.security.login_manager
9 public: true
10
11 wallabag_core.entry_repository.test:
12 alias: wallabag_core.entry_repository
13 public: true
14
15 wallabag_user.user_repository.test:
16 alias: wallabag_user.user_repository
17 public: true
18
19 filesystem_cache:
20 class: Doctrine\Common\Cache\FilesystemCache
21 arguments:
22 - "%kernel.cache_dir%/doctrine/metadata"
23
24 # fixtures
25 Wallabag\UserBundle\DataFixtures\:
26 resource: '../../src/Wallabag/UserBundle/DataFixtures/*'
27 tags: ['doctrine.fixture.orm']
28 autowire: true
29
30 Wallabag\CoreBundle\DataFixtures\:
31 resource: '../../src/Wallabag/CoreBundle/DataFixtures/*'
32 tags: ['doctrine.fixture.orm']
33 autowire: true
34
35 Wallabag\AnnotationBundle\DataFixtures\:
36 resource: '../../src/Wallabag/AnnotationBundle/DataFixtures/*'
37 tags: ['doctrine.fixture.orm']
38 autowire: true
diff --git a/app/config/tests/parameters_test.mysql.yml b/app/config/tests/parameters_test.mysql.yml
index 0b7b82eb..36b227fb 100644
--- a/app/config/tests/parameters_test.mysql.yml
+++ b/app/config/tests/parameters_test.mysql.yml
@@ -1,6 +1,5 @@
1parameters: 1parameters:
2 test_database_driver: pdo_mysql 2 test_database_driver: pdo_mysql
3 test_database_driver_class: ~
4 test_database_host: localhost 3 test_database_host: localhost
5 test_database_port: 3306 4 test_database_port: 3306
6 test_database_name: wallabag_test 5 test_database_name: wallabag_test
diff --git a/app/config/tests/parameters_test.pgsql.yml b/app/config/tests/parameters_test.pgsql.yml
index ea249324..60f51df6 100644
--- a/app/config/tests/parameters_test.pgsql.yml
+++ b/app/config/tests/parameters_test.pgsql.yml
@@ -1,6 +1,5 @@
1parameters: 1parameters:
2 test_database_driver: pdo_pgsql 2 test_database_driver: pdo_pgsql
3 test_database_driver_class: Wallabag\CoreBundle\Doctrine\DBAL\Driver\CustomPostgreSQLDriver
4 test_database_host: localhost 3 test_database_host: localhost
5 test_database_port: 4 test_database_port:
6 test_database_name: wallabag_test 5 test_database_name: wallabag_test
diff --git a/app/config/tests/parameters_test.sqlite.yml b/app/config/tests/parameters_test.sqlite.yml
index 64cd984b..2b92d579 100644
--- a/app/config/tests/parameters_test.sqlite.yml
+++ b/app/config/tests/parameters_test.sqlite.yml
@@ -1,6 +1,5 @@
1parameters: 1parameters:
2 test_database_driver: pdo_sqlite 2 test_database_driver: pdo_sqlite
3 test_database_driver_class: ~
4 test_database_host: localhost 3 test_database_host: localhost
5 test_database_port: 4 test_database_port:
6 test_database_name: ~ 5 test_database_name: ~
diff --git a/app/config/wallabag.yml b/app/config/wallabag.yml
index d9a3d5dc..c54d7eb7 100644
--- a/app/config/wallabag.yml
+++ b/app/config/wallabag.yml
@@ -1,5 +1,5 @@
1wallabag_core: 1wallabag_core:
2 version: 2.3.6-dev 2 version: 2.4.0-dev
3 paypal_url: "https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=9UBA65LG3FX9Y&lc=gb" 3 paypal_url: "https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=9UBA65LG3FX9Y&lc=gb"
4 languages: 4 languages:
5 en: 'English' 5 en: 'English'
@@ -20,13 +20,13 @@ wallabag_core:
20 theme: material 20 theme: material
21 language: '%locale%' 21 language: '%locale%'
22 rss_limit: 50 22 rss_limit: 50
23 reading_speed: 1 23 reading_speed: 200
24 cache_lifetime: 10 24 cache_lifetime: 10
25 action_mark_as_read: 1 25 action_mark_as_read: 1
26 list_mode: 0 26 list_mode: 0
27 fetching_error_message_title: 'No title found' 27 fetching_error_message_title: 'No title found'
28 fetching_error_message: | 28 fetching_error_message: |
29 wallabag can't retrieve contents for this article. Please <a href="http://doc.wallabag.org/en/user/errors_during_fetching.html#how-can-i-help-to-fix-that">troubleshoot this issue</a>. 29 wallabag can't retrieve contents for this article. Please <a href="https://doc.wallabag.org/en/user/errors_during_fetching.html#how-can-i-help-to-fix-that">troubleshoot this issue</a>.
30 api_limit_mass_actions: 10 30 api_limit_mass_actions: 10
31 encryption_key_path: "%kernel.project_dir%/data/site-credentials-secret-key.txt" 31 encryption_key_path: "%kernel.project_dir%/data/site-credentials-secret-key.txt"
32 default_internal_settings: 32 default_internal_settings:
@@ -44,7 +44,7 @@ wallabag_core:
44 section: entry 44 section: entry
45 - 45 -
46 name: diaspora_url 46 name: diaspora_url
47 value: http://diasporapod.com 47 value: https://diasporapod.com
48 section: entry 48 section: entry
49 - 49 -
50 name: share_unmark 50 name: share_unmark
@@ -64,11 +64,11 @@ wallabag_core:
64 section: entry 64 section: entry
65 - 65 -
66 name: shaarli_url 66 name: shaarli_url
67 value: http://myshaarli.com 67 value: https://myshaarli.com
68 section: entry 68 section: entry
69 - 69 -
70 name: scuttle_url 70 name: scuttle_url
71 value: http://scuttle.org 71 value: https://scuttle.org
72 section: entry 72 section: entry
73 - 73 -
74 name: share_mail 74 name: share_mail