diff options
author | Nicolas Lœuillet <nicolas@loeuillet.org> | 2017-01-26 13:15:06 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-01-26 13:15:06 +0100 |
commit | 463cb376e357d50c5913452fba68a70bf43492c9 (patch) | |
tree | ec6ae907d00b7637c0a3238943e6ffcb78802924 | |
parent | 012b2d453e0cbe1ab478c2868559f919ea805db2 (diff) | |
parent | 5d916d03afaec6fbe32d2a95624628096325744e (diff) | |
download | wallabag-463cb376e357d50c5913452fba68a70bf43492c9.tar.gz wallabag-463cb376e357d50c5913452fba68a70bf43492c9.tar.zst wallabag-463cb376e357d50c5913452fba68a70bf43492c9.zip |
Merge pull request #2646 from wallabag/explain-migrations-in-doc
Added explanations about migrations
21 files changed, 2641 insertions, 113 deletions
diff --git a/app/DoctrineMigrations/Version20160410190541.php b/app/DoctrineMigrations/Version20160410190541.php index f166a325..ebf4135f 100644 --- a/app/DoctrineMigrations/Version20160410190541.php +++ b/app/DoctrineMigrations/Version20160410190541.php | |||
@@ -7,6 +7,9 @@ use Doctrine\DBAL\Schema\Schema; | |||
7 | use Symfony\Component\DependencyInjection\ContainerAwareInterface; | 7 | use Symfony\Component\DependencyInjection\ContainerAwareInterface; |
8 | use Symfony\Component\DependencyInjection\ContainerInterface; | 8 | use Symfony\Component\DependencyInjection\ContainerInterface; |
9 | 9 | ||
10 | /** | ||
11 | * Added foreign keys for account resetting | ||
12 | */ | ||
10 | class Version20160410190541 extends AbstractMigration implements ContainerAwareInterface | 13 | class Version20160410190541 extends AbstractMigration implements ContainerAwareInterface |
11 | { | 14 | { |
12 | /** | 15 | /** |
diff --git a/app/DoctrineMigrations/Version20160812120952.php b/app/DoctrineMigrations/Version20160812120952.php index 053b8d88..bd6e8d63 100644 --- a/app/DoctrineMigrations/Version20160812120952.php +++ b/app/DoctrineMigrations/Version20160812120952.php | |||
@@ -7,6 +7,9 @@ use Doctrine\DBAL\Schema\Schema; | |||
7 | use Symfony\Component\DependencyInjection\ContainerAwareInterface; | 7 | use Symfony\Component\DependencyInjection\ContainerAwareInterface; |
8 | use Symfony\Component\DependencyInjection\ContainerInterface; | 8 | use Symfony\Component\DependencyInjection\ContainerInterface; |
9 | 9 | ||
10 | /** | ||
11 | * Added name field on wallabag_oauth2_clients | ||
12 | */ | ||
10 | class Version20160812120952 extends AbstractMigration implements ContainerAwareInterface | 13 | class Version20160812120952 extends AbstractMigration implements ContainerAwareInterface |
11 | { | 14 | { |
12 | /** | 15 | /** |
diff --git a/app/DoctrineMigrations/Version20160911214952.php b/app/DoctrineMigrations/Version20160911214952.php index 6ddeb767..edef81ed 100644 --- a/app/DoctrineMigrations/Version20160911214952.php +++ b/app/DoctrineMigrations/Version20160911214952.php | |||
@@ -7,6 +7,9 @@ use Doctrine\DBAL\Schema\Schema; | |||
7 | use Symfony\Component\DependencyInjection\ContainerAwareInterface; | 7 | use Symfony\Component\DependencyInjection\ContainerAwareInterface; |
8 | use Symfony\Component\DependencyInjection\ContainerInterface; | 8 | use Symfony\Component\DependencyInjection\ContainerInterface; |
9 | 9 | ||
10 | /** | ||
11 | * Added settings for RabbitMQ and Redis imports | ||
12 | */ | ||
10 | class Version20160911214952 extends AbstractMigration implements ContainerAwareInterface | 13 | class Version20160911214952 extends AbstractMigration implements ContainerAwareInterface |
11 | { | 14 | { |
12 | /** | 15 | /** |
diff --git a/app/DoctrineMigrations/Version20160916201049.php b/app/DoctrineMigrations/Version20160916201049.php index 8b42bb87..9f8e77e7 100644 --- a/app/DoctrineMigrations/Version20160916201049.php +++ b/app/DoctrineMigrations/Version20160916201049.php | |||
@@ -7,6 +7,9 @@ use Doctrine\DBAL\Schema\Schema; | |||
7 | use Symfony\Component\DependencyInjection\ContainerAwareInterface; | 7 | use Symfony\Component\DependencyInjection\ContainerAwareInterface; |
8 | use Symfony\Component\DependencyInjection\ContainerInterface; | 8 | use Symfony\Component\DependencyInjection\ContainerInterface; |
9 | 9 | ||
10 | /** | ||
11 | * Added pocket_consumer_key field on wallabag_config | ||
12 | */ | ||
10 | class Version20160916201049 extends AbstractMigration implements ContainerAwareInterface | 13 | class Version20160916201049 extends AbstractMigration implements ContainerAwareInterface |
11 | { | 14 | { |
12 | /** | 15 | /** |
diff --git a/app/DoctrineMigrations/Version20161001072726.php b/app/DoctrineMigrations/Version20161001072726.php index f6930778..f247c236 100644 --- a/app/DoctrineMigrations/Version20161001072726.php +++ b/app/DoctrineMigrations/Version20161001072726.php | |||
@@ -6,7 +6,11 @@ use Doctrine\DBAL\Migrations\AbstractMigration; | |||
6 | use Doctrine\DBAL\Schema\Schema; | 6 | use Doctrine\DBAL\Schema\Schema; |
7 | use Symfony\Component\DependencyInjection\ContainerAwareInterface; | 7 | use Symfony\Component\DependencyInjection\ContainerAwareInterface; |
8 | use Symfony\Component\DependencyInjection\ContainerInterface; | 8 | use Symfony\Component\DependencyInjection\ContainerInterface; |
9 | use Doctrine\DBAL\Migrations\SkipMigrationException; | ||
9 | 10 | ||
11 | /** | ||
12 | * Added pocket_consumer_key field on wallabag_config | ||
13 | */ | ||
10 | class Version20161001072726 extends AbstractMigration implements ContainerAwareInterface | 14 | class Version20161001072726 extends AbstractMigration implements ContainerAwareInterface |
11 | { | 15 | { |
12 | /** | 16 | /** |
diff --git a/app/DoctrineMigrations/Version20161022134138.php b/app/DoctrineMigrations/Version20161022134138.php index d0e5cb3f..c71166a0 100644 --- a/app/DoctrineMigrations/Version20161022134138.php +++ b/app/DoctrineMigrations/Version20161022134138.php | |||
@@ -7,6 +7,9 @@ use Doctrine\DBAL\Schema\Schema; | |||
7 | use Symfony\Component\DependencyInjection\ContainerAwareInterface; | 7 | use Symfony\Component\DependencyInjection\ContainerAwareInterface; |
8 | use Symfony\Component\DependencyInjection\ContainerInterface; | 8 | use Symfony\Component\DependencyInjection\ContainerInterface; |
9 | 9 | ||
10 | /** | ||
11 | * Converted database to utf8mb4 encoding (for MySQL only) | ||
12 | */ | ||
10 | class Version20161022134138 extends AbstractMigration implements ContainerAwareInterface | 13 | class Version20161022134138 extends AbstractMigration implements ContainerAwareInterface |
11 | { | 14 | { |
12 | /** | 15 | /** |
diff --git a/app/DoctrineMigrations/Version20161024212538.php b/app/DoctrineMigrations/Version20161024212538.php index 75ff86f1..ecb872d1 100644 --- a/app/DoctrineMigrations/Version20161024212538.php +++ b/app/DoctrineMigrations/Version20161024212538.php | |||
@@ -7,6 +7,9 @@ use Doctrine\DBAL\Schema\Schema; | |||
7 | use Symfony\Component\DependencyInjection\ContainerAwareInterface; | 7 | use Symfony\Component\DependencyInjection\ContainerAwareInterface; |
8 | use Symfony\Component\DependencyInjection\ContainerInterface; | 8 | use Symfony\Component\DependencyInjection\ContainerInterface; |
9 | 9 | ||
10 | /** | ||
11 | * Added user_id column on oauth2_clients to prevent users to delete API clients from other users | ||
12 | */ | ||
10 | class Version20161024212538 extends AbstractMigration implements ContainerAwareInterface | 13 | class Version20161024212538 extends AbstractMigration implements ContainerAwareInterface |
11 | { | 14 | { |
12 | /** | 15 | /** |
@@ -14,6 +17,8 @@ class Version20161024212538 extends AbstractMigration implements ContainerAwareI | |||
14 | */ | 17 | */ |
15 | private $container; | 18 | private $container; |
16 | 19 | ||
20 | private $constraintName = 'IDX_user_oauth_client'; | ||
21 | |||
17 | public function setContainer(ContainerInterface $container = null) | 22 | public function setContainer(ContainerInterface $container = null) |
18 | { | 23 | { |
19 | $this->container = $container; | 24 | $this->container = $container; |
@@ -33,13 +38,14 @@ class Version20161024212538 extends AbstractMigration implements ContainerAwareI | |||
33 | 38 | ||
34 | $this->skipIf($clientsTable->hasColumn('user_id'), 'It seems that you already played this migration.'); | 39 | $this->skipIf($clientsTable->hasColumn('user_id'), 'It seems that you already played this migration.'); |
35 | 40 | ||
36 | $clientsTable->addColumn('user_id', 'integer'); | 41 | $clientsTable->addColumn('user_id', 'integer', ['notnull' => false]); |
37 | 42 | ||
38 | $clientsTable->addForeignKeyConstraint( | 43 | $clientsTable->addForeignKeyConstraint( |
39 | $this->getTable('user'), | 44 | $this->getTable('user'), |
40 | ['user_id'], | 45 | ['user_id'], |
41 | ['id'], | 46 | ['id'], |
42 | ['onDelete' => 'CASCADE'] | 47 | ['onDelete' => 'CASCADE'], |
48 | $this->constraintName | ||
43 | ); | 49 | ); |
44 | } | 50 | } |
45 | 51 | ||
@@ -48,5 +54,14 @@ class Version20161024212538 extends AbstractMigration implements ContainerAwareI | |||
48 | */ | 54 | */ |
49 | public function down(Schema $schema) | 55 | public function down(Schema $schema) |
50 | { | 56 | { |
57 | $clientsTable = $schema->getTable($this->getTable('oauth2_clients')); | ||
58 | |||
59 | $this->skipIf(!$clientsTable->hasColumn('user_id'), 'It seems that you already played this migration.'); | ||
60 | |||
61 | $clientsTable->dropColumn('user_id', 'integer'); | ||
62 | |||
63 | if ($this->connection->getDatabasePlatform()->getName() != 'sqlite') { | ||
64 | $clientsTable->removeForeignKey($this->constraintName); | ||
65 | } | ||
51 | } | 66 | } |
52 | } | 67 | } |
diff --git a/app/DoctrineMigrations/Version20161031132655.php b/app/DoctrineMigrations/Version20161031132655.php index f81898ff..83b97ca9 100644 --- a/app/DoctrineMigrations/Version20161031132655.php +++ b/app/DoctrineMigrations/Version20161031132655.php | |||
@@ -7,6 +7,9 @@ use Doctrine\DBAL\Schema\Schema; | |||
7 | use Symfony\Component\DependencyInjection\ContainerAwareInterface; | 7 | use Symfony\Component\DependencyInjection\ContainerAwareInterface; |
8 | use Symfony\Component\DependencyInjection\ContainerInterface; | 8 | use Symfony\Component\DependencyInjection\ContainerInterface; |
9 | 9 | ||
10 | /** | ||
11 | * Added the internal setting to enable/disable downloading pictures | ||
12 | */ | ||
10 | class Version20161031132655 extends AbstractMigration implements ContainerAwareInterface | 13 | class Version20161031132655 extends AbstractMigration implements ContainerAwareInterface |
11 | { | 14 | { |
12 | /** | 15 | /** |
diff --git a/app/DoctrineMigrations/Version20161104073720.php b/app/DoctrineMigrations/Version20161104073720.php index 4721426a..fb8f5fa1 100644 --- a/app/DoctrineMigrations/Version20161104073720.php +++ b/app/DoctrineMigrations/Version20161104073720.php | |||
@@ -7,6 +7,9 @@ use Doctrine\DBAL\Schema\Schema; | |||
7 | use Symfony\Component\DependencyInjection\ContainerAwareInterface; | 7 | use Symfony\Component\DependencyInjection\ContainerAwareInterface; |
8 | use Symfony\Component\DependencyInjection\ContainerInterface; | 8 | use Symfony\Component\DependencyInjection\ContainerInterface; |
9 | 9 | ||
10 | /** | ||
11 | * Added created_at index on entry table | ||
12 | */ | ||
10 | class Version20161104073720 extends AbstractMigration implements ContainerAwareInterface | 13 | class Version20161104073720 extends AbstractMigration implements ContainerAwareInterface |
11 | { | 14 | { |
12 | /** | 15 | /** |
diff --git a/app/DoctrineMigrations/Version20161106113822.php b/app/DoctrineMigrations/Version20161106113822.php index 55bd87a2..de3702a4 100644 --- a/app/DoctrineMigrations/Version20161106113822.php +++ b/app/DoctrineMigrations/Version20161106113822.php | |||
@@ -7,6 +7,9 @@ use Doctrine\DBAL\Schema\Schema; | |||
7 | use Symfony\Component\DependencyInjection\ContainerAwareInterface; | 7 | use Symfony\Component\DependencyInjection\ContainerAwareInterface; |
8 | use Symfony\Component\DependencyInjection\ContainerInterface; | 8 | use Symfony\Component\DependencyInjection\ContainerInterface; |
9 | 9 | ||
10 | /** | ||
11 | * Added action_mark_as_read field on config table | ||
12 | */ | ||
10 | class Version20161106113822 extends AbstractMigration implements ContainerAwareInterface | 13 | class Version20161106113822 extends AbstractMigration implements ContainerAwareInterface |
11 | { | 14 | { |
12 | /** | 15 | /** |
@@ -45,6 +48,9 @@ class Version20161106113822 extends AbstractMigration implements ContainerAwareI | |||
45 | public function down(Schema $schema) | 48 | public function down(Schema $schema) |
46 | { | 49 | { |
47 | $configTable = $schema->getTable($this->getTable('config')); | 50 | $configTable = $schema->getTable($this->getTable('config')); |
48 | $userTable->dropColumn('action_mark_as_read'); | 51 | |
52 | $this->skipIf(!$configTable->hasColumn('action_mark_as_read'), 'It seems that you already played this migration.'); | ||
53 | |||
54 | $configTable->dropColumn('action_mark_as_read'); | ||
49 | } | 55 | } |
50 | } | 56 | } |
diff --git a/app/DoctrineMigrations/Version20161117071626.php b/app/DoctrineMigrations/Version20161117071626.php index d864888f..8daa2142 100644 --- a/app/DoctrineMigrations/Version20161117071626.php +++ b/app/DoctrineMigrations/Version20161117071626.php | |||
@@ -7,6 +7,9 @@ use Doctrine\DBAL\Schema\Schema; | |||
7 | use Symfony\Component\DependencyInjection\ContainerAwareInterface; | 7 | use Symfony\Component\DependencyInjection\ContainerAwareInterface; |
8 | use Symfony\Component\DependencyInjection\ContainerInterface; | 8 | use Symfony\Component\DependencyInjection\ContainerInterface; |
9 | 9 | ||
10 | /** | ||
11 | * Added the internal setting to share articles to unmark.it | ||
12 | */ | ||
10 | class Version20161117071626 extends AbstractMigration implements ContainerAwareInterface | 13 | class Version20161117071626 extends AbstractMigration implements ContainerAwareInterface |
11 | { | 14 | { |
12 | /** | 15 | /** |
diff --git a/app/DoctrineMigrations/Version20161118134328.php b/app/DoctrineMigrations/Version20161118134328.php index f168cb53..7b2eeb7b 100644 --- a/app/DoctrineMigrations/Version20161118134328.php +++ b/app/DoctrineMigrations/Version20161118134328.php | |||
@@ -47,7 +47,10 @@ class Version20161118134328 extends AbstractMigration implements ContainerAwareI | |||
47 | */ | 47 | */ |
48 | public function down(Schema $schema) | 48 | public function down(Schema $schema) |
49 | { | 49 | { |
50 | $userTable = $schema->getTable($this->getTable('entry')); | 50 | $entryTable = $schema->getTable($this->getTable('entry')); |
51 | $userTable->dropColumn('http_status'); | 51 | |
52 | $this->skipIf(!$entryTable->hasColumn('http_status'), 'It seems that you already played this migration.'); | ||
53 | |||
54 | $entryTable->dropColumn('http_status'); | ||
52 | } | 55 | } |
53 | } | 56 | } |
diff --git a/app/DoctrineMigrations/Version20161122203647.php b/app/DoctrineMigrations/Version20161122203647.php index 94197193..9b17d6ef 100644 --- a/app/DoctrineMigrations/Version20161122203647.php +++ b/app/DoctrineMigrations/Version20161122203647.php | |||
@@ -54,7 +54,10 @@ class Version20161122203647 extends AbstractMigration implements ContainerAwareI | |||
54 | public function down(Schema $schema) | 54 | public function down(Schema $schema) |
55 | { | 55 | { |
56 | $userTable = $schema->getTable($this->getTable('user')); | 56 | $userTable = $schema->getTable($this->getTable('user')); |
57 | $userTable->addColumn('expired', 'smallint'); | 57 | |
58 | $userTable->addColumn('credentials_expired', 'smallint'); | 58 | $this->skipIf(true === $userTable->hasColumn('expired') || true === $userTable->hasColumn('credentials_expired'), 'It seems that you already played this migration.'); |
59 | |||
60 | $userTable->addColumn('expired', 'smallint', ['notnull' => false]); | ||
61 | $userTable->addColumn('credentials_expired', 'smallint', ['notnull' => false]); | ||
59 | } | 62 | } |
60 | } | 63 | } |
diff --git a/app/DoctrineMigrations/Version20161128131503.php b/app/DoctrineMigrations/Version20161128131503.php index f0e016c8..b71aa38b 100644 --- a/app/DoctrineMigrations/Version20161128131503.php +++ b/app/DoctrineMigrations/Version20161128131503.php | |||
@@ -55,7 +55,7 @@ class Version20161128131503 extends AbstractMigration implements ContainerAwareI | |||
55 | 55 | ||
56 | foreach ($this->fields as $field => $type) { | 56 | foreach ($this->fields as $field => $type) { |
57 | $this->skipIf($userTable->hasColumn($field), 'It seems that you already played this migration.'); | 57 | $this->skipIf($userTable->hasColumn($field), 'It seems that you already played this migration.'); |
58 | $userTable->addColumn($field, $type); | 58 | $userTable->addColumn($field, $type, ['notnull' => false]); |
59 | } | 59 | } |
60 | } | 60 | } |
61 | } | 61 | } |
diff --git a/docs/de/user/query-upgrade-21-22.rst b/docs/de/user/query-upgrade-21-22.rst new file mode 100644 index 00000000..cd201dc2 --- /dev/null +++ b/docs/de/user/query-upgrade-21-22.rst | |||
@@ -0,0 +1,797 @@ | |||
1 | Migration 20161001072726 | ||
2 | ------------------------ | ||
3 | |||
4 | MySQL | ||
5 | ^^^^^ | ||
6 | |||
7 | Migration up | ||
8 | """""""""""" | ||
9 | |||
10 | .. code-block:: sql | ||
11 | |||
12 | ALTER TABLE wallabag_entry_tag DROP FOREIGN KEY FK_C9F0DD7CBA364942 | ||
13 | ALTER TABLE wallabag_entry_tag DROP FOREIGN KEY FK_C9F0DD7CBAD26311 | ||
14 | ALTER TABLE wallabag_entry_tag ADD CONSTRAINT FK_entry_tag_entry FOREIGN KEY (entry_id) REFERENCES wallabag_entry (id) ON DELETE CASCADE | ||
15 | ALTER TABLE wallabag_entry_tag ADD CONSTRAINT FK_entry_tag_tag FOREIGN KEY (tag_id) REFERENCES wallabag_tag (id) ON DELETE CASCADE | ||
16 | ALTER TABLE wallabag_annotation DROP FOREIGN KEY FK_A7AED006BA364942 | ||
17 | ALTER TABLE wallabag_annotation ADD CONSTRAINT FK_annotation_entry FOREIGN KEY (entry_id) REFERENCES wallabag_entry (id) ON DELETE CASCADE | ||
18 | |||
19 | Migration down | ||
20 | """""""""""""" | ||
21 | |||
22 | We didn't write down migration for ``20161001072726``. | ||
23 | |||
24 | PostgreSQL | ||
25 | ^^^^^^^^^^ | ||
26 | |||
27 | Migration up | ||
28 | """""""""""" | ||
29 | |||
30 | .. code-block:: sql | ||
31 | |||
32 | ALTER TABLE wallabag_entry_tag DROP CONSTRAINT fk_c9f0dd7cba364942 | ||
33 | ALTER TABLE wallabag_entry_tag DROP CONSTRAINT fk_c9f0dd7cbad26311 | ||
34 | ALTER TABLE wallabag_entry_tag ADD CONSTRAINT FK_entry_tag_entry FOREIGN KEY (entry_id) REFERENCES wallabag_entry (id) ON DELETE CASCADE | ||
35 | ALTER TABLE wallabag_entry_tag ADD CONSTRAINT FK_entry_tag_tag FOREIGN KEY (tag_id) REFERENCES wallabag_tag (id) ON DELETE CASCADE | ||
36 | ALTER TABLE wallabag_annotation DROP CONSTRAINT fk_a7aed006ba364942 | ||
37 | ALTER TABLE wallabag_annotation ADD CONSTRAINT FK_annotation_entry FOREIGN KEY (entry_id) REFERENCES wallabag_entry (id) ON DELETE CASCADE | ||
38 | |||
39 | Migration down | ||
40 | """""""""""""" | ||
41 | |||
42 | We didn't write down migration for ``20161001072726``. | ||
43 | |||
44 | SQLite | ||
45 | ^^^^^^ | ||
46 | |||
47 | This migration can only be executed safely on MySQL or PostgreSQL. | ||
48 | |||
49 | Migration 20161022134138 | ||
50 | ------------------------ | ||
51 | |||
52 | MySQL | ||
53 | ^^^^^ | ||
54 | |||
55 | Migration up | ||
56 | """""""""""" | ||
57 | |||
58 | .. code-block:: sql | ||
59 | |||
60 | ALTER DATABASE wallabag CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci; | ||
61 | ALTER TABLE wallabag_user CHANGE confirmation_token confirmation_token VARCHAR(180) DEFAULT NULL; | ||
62 | ALTER TABLE wallabag_user CHANGE salt salt VARCHAR(180) NOT NULL; | ||
63 | ALTER TABLE wallabag_user CHANGE password password VARCHAR(180) NOT NULL; | ||
64 | ALTER TABLE wallabag_annotation CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci; | ||
65 | ALTER TABLE wallabag_entry CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci; | ||
66 | ALTER TABLE wallabag_tag CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci; | ||
67 | ALTER TABLE wallabag_user CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci; | ||
68 | ALTER TABLE wallabag_annotation CHANGE `text` `text` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci; | ||
69 | ALTER TABLE wallabag_annotation CHANGE `quote` `quote` VARCHAR(191) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci; | ||
70 | ALTER TABLE wallabag_entry CHANGE `title` `title` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci; | ||
71 | ALTER TABLE wallabag_entry CHANGE `content` `content` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci; | ||
72 | ALTER TABLE wallabag_tag CHANGE `label` `label` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci; | ||
73 | ALTER TABLE wallabag_user CHANGE `name` `name` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci; | ||
74 | |||
75 | Migration down | ||
76 | """""""""""""" | ||
77 | |||
78 | .. code-block:: sql | ||
79 | |||
80 | ALTER DATABASE wallabag CHARACTER SET = utf8 COLLATE = utf8_unicode_ci; | ||
81 | ALTER TABLE wallabag_annotation CONVERT TO CHARACTER SET utf8 COLLATE utf8_unicode_ci; | ||
82 | ALTER TABLE wallabag_entry CONVERT TO CHARACTER SET utf8 COLLATE utf8_unicode_ci; | ||
83 | ALTER TABLE wallabag_tag CONVERT TO CHARACTER SET utf8 COLLATE utf8_unicode_ci; | ||
84 | ALTER TABLE wallabag_user CONVERT TO CHARACTER SET utf8 COLLATE utf8_unicode_ci; | ||
85 | ALTER TABLE wallabag_annotation CHANGE `text` `text` longtext CHARACTER SET utf8 COLLATE utf8_unicode_ci; | ||
86 | ALTER TABLE wallabag_annotation CHANGE `quote` `quote` VARCHAR(255) CHARACTER SET utf8 COLLATE utf8_unicode_ci; | ||
87 | ALTER TABLE wallabag_entry CHANGE `title` `title` longtext CHARACTER SET utf8 COLLATE utf8_unicode_ci; | ||
88 | ALTER TABLE wallabag_entry CHANGE `content` `content` longtext CHARACTER SET utf8 COLLATE utf8_unicode_ci; | ||
89 | ALTER TABLE wallabag_tag CHANGE `label` `label` longtext CHARACTER SET utf8 COLLATE utf8_unicode_ci; | ||
90 | ALTER TABLE wallabag_user CHANGE `name` `name` longtext CHARACTER SET utf8 COLLATE utf8_unicode_ci; | ||
91 | |||
92 | PostgreSQL and SQLite | ||
93 | ^^^^^^^^^^^^^^^^^^^^^ | ||
94 | |||
95 | This migration only apply to MySQL. | ||
96 | |||
97 | Migration 20161024212538 | ||
98 | ------------------------ | ||
99 | |||
100 | MySQL | ||
101 | ^^^^^ | ||
102 | |||
103 | Migration up | ||
104 | """""""""""" | ||
105 | |||
106 | .. code-block:: sql | ||
107 | |||
108 | ALTER TABLE wallabag_oauth2_clients ADD user_id INT NOT NULL | ||
109 | ALTER TABLE wallabag_oauth2_clients ADD CONSTRAINT IDX_user_oauth_client FOREIGN KEY (user_id) REFERENCES wallabag_user (id) ON DELETE CASCADE | ||
110 | CREATE INDEX IDX_635D765EA76ED395 ON wallabag_oauth2_clients (user_id) | ||
111 | |||
112 | Migration down | ||
113 | """""""""""""" | ||
114 | |||
115 | .. code-block:: sql | ||
116 | |||
117 | ALTER TABLE wallabag_oauth2_clients DROP FOREIGN KEY IDX_user_oauth_client | ||
118 | ALTER TABLE wallabag_oauth2_clients DROP user_id | ||
119 | |||
120 | PostgreSQL | ||
121 | ^^^^^^^^^^ | ||
122 | |||
123 | Migration up | ||
124 | """""""""""" | ||
125 | |||
126 | .. code-block:: sql | ||
127 | |||
128 | ALTER TABLE wallabag_oauth2_clients ADD user_id INT DEFAULT NULL | ||
129 | ALTER TABLE wallabag_oauth2_clients ADD CONSTRAINT IDX_user_oauth_client FOREIGN KEY (user_id) REFERENCES wallabag_user (id) ON DELETE CASCADE NOT DEFERRABLE INITIALLY IMMEDIATE | ||
130 | CREATE INDEX IDX_635D765EA76ED395 ON wallabag_oauth2_clients (user_id) | ||
131 | |||
132 | |||
133 | Migration down | ||
134 | """""""""""""" | ||
135 | |||
136 | .. code-block:: sql | ||
137 | |||
138 | ALTER TABLE wallabag_oauth2_clients DROP CONSTRAINT idx_user_oauth_client | ||
139 | ALTER TABLE wallabag_oauth2_clients DROP user_id | ||
140 | |||
141 | SQLite | ||
142 | ^^^^^^ | ||
143 | |||
144 | Migration up | ||
145 | """""""""""" | ||
146 | |||
147 | .. code-block:: sql | ||
148 | |||
149 | CREATE TEMPORARY TABLE __temp__wallabag_oauth2_clients AS SELECT id, random_id, redirect_uris, secret, allowed_grant_types, name FROM wallabag_oauth2_clients | ||
150 | DROP TABLE wallabag_oauth2_clients | ||
151 | CREATE TABLE wallabag_oauth2_clients (id INTEGER NOT NULL, user_id INTEGER DEFAULT NULL, random_id VARCHAR(255) NOT NULL COLLATE BINARY, redirect_uris CLOB NOT NULL COLLATE BINARY, secret VARCHAR(255) NOT NULL COLLATE BINARY, allowed_grant_types CLOB NOT NULL COLLATE BINARY, name CLOB DEFAULT NULL COLLATE BINARY, PRIMARY KEY(id), CONSTRAINT IDX_user_oauth_client FOREIGN KEY (user_id) REFERENCES wallabag_user (id) ON DELETE CASCADE NOT DEFERRABLE INITIALLY IMMEDIATE) | ||
152 | INSERT INTO wallabag_oauth2_clients (id, random_id, redirect_uris, secret, allowed_grant_types, name) SELECT id, random_id, redirect_uris, secret, allowed_grant_types, name FROM __temp__wallabag_oauth2_clients | ||
153 | DROP TABLE __temp__wallabag_oauth2_clients | ||
154 | CREATE INDEX IDX_635D765EA76ED395 ON wallabag_oauth2_clients (user_id) | ||
155 | |||
156 | Migration down | ||
157 | """""""""""""" | ||
158 | |||
159 | .. code-block:: sql | ||
160 | |||
161 | DROP INDEX IDX_635D765EA76ED395 | ||
162 | CREATE TEMPORARY TABLE __temp__wallabag_oauth2_clients AS SELECT id, random_id, redirect_uris, secret, allowed_grant_types, name FROM wallabag_oauth2_clients | ||
163 | DROP TABLE wallabag_oauth2_clients | ||
164 | CREATE TABLE wallabag_oauth2_clients (id INTEGER NOT NULL, random_id VARCHAR(255) NOT NULL COLLATE BINARY, redirect_uris CLOB NOT NULL COLLATE BINARY, secret VARCHAR(255) NOT NULL COLLATE BINARY, allowed_grant_types CLOB NOT NULL COLLATE BINARY, name CLOB DEFAULT NULL COLLATE BINARY, PRIMARY KEY(id)) | ||
165 | INSERT INTO wallabag_oauth2_clients (id, random_id, redirect_uris, secret, allowed_grant_types, name) SELECT id, random_id, redirect_uris, secret, allowed_grant_types, name FROM __temp__wallabag_oauth2_clients | ||
166 | DROP TABLE __temp__wallabag_oauth2_clients | ||
167 | |||
168 | Migration 20161031132655 | ||
169 | ------------------------ | ||
170 | |||
171 | MySQL | ||
172 | ^^^^^ | ||
173 | |||
174 | Migration up | ||
175 | """""""""""" | ||
176 | |||
177 | .. code-block:: sql | ||
178 | |||
179 | INSERT INTO wallabag_craue_config_setting (name, value, section) VALUES ('download_images_enabled', 0, 'misc') | ||
180 | |||
181 | Migration down | ||
182 | """""""""""""" | ||
183 | |||
184 | .. code-block:: sql | ||
185 | |||
186 | DELETE FROM wallabag_craue_config_setting WHERE name = 'download_images_enabled'; | ||
187 | |||
188 | PostgreSQL | ||
189 | ^^^^^^^^^^ | ||
190 | |||
191 | Migration up | ||
192 | """""""""""" | ||
193 | |||
194 | .. code-block:: sql | ||
195 | |||
196 | INSERT INTO wallabag_craue_config_setting (name, value, section) VALUES ('download_images_enabled', 0, 'misc') | ||
197 | |||
198 | Migration down | ||
199 | """""""""""""" | ||
200 | |||
201 | .. code-block:: sql | ||
202 | |||
203 | DELETE FROM wallabag_craue_config_setting WHERE name = 'download_images_enabled'; | ||
204 | |||
205 | SQLite | ||
206 | ^^^^^^ | ||
207 | |||
208 | Migration up | ||
209 | """""""""""" | ||
210 | |||
211 | .. code-block:: sql | ||
212 | |||
213 | INSERT INTO wallabag_craue_config_setting (name, value, section) VALUES ('download_images_enabled', 0, 'misc') | ||
214 | |||
215 | Migration down | ||
216 | """""""""""""" | ||
217 | |||
218 | .. code-block:: sql | ||
219 | |||
220 | DELETE FROM wallabag_craue_config_setting WHERE name = 'download_images_enabled'; | ||
221 | |||
222 | Migration 20161104073720 | ||
223 | ------------------------ | ||
224 | |||
225 | MySQL | ||
226 | ^^^^^ | ||
227 | |||
228 | Migration up | ||
229 | """""""""""" | ||
230 | |||
231 | .. code-block:: sql | ||
232 | |||
233 | CREATE INDEX IDX_entry_created_at ON wallabag_entry (created_at) | ||
234 | |||
235 | Migration down | ||
236 | """""""""""""" | ||
237 | |||
238 | .. code-block:: sql | ||
239 | |||
240 | DROP INDEX IDX_entry_created_at ON wallabag_entry | ||
241 | |||
242 | PostgreSQL | ||
243 | ^^^^^^^^^^ | ||
244 | |||
245 | Migration up | ||
246 | """""""""""" | ||
247 | |||
248 | .. code-block:: sql | ||
249 | |||
250 | CREATE INDEX IDX_entry_created_at ON wallabag_entry (created_at) | ||
251 | |||
252 | Migration down | ||
253 | """""""""""""" | ||
254 | |||
255 | .. code-block:: sql | ||
256 | |||
257 | DROP INDEX idx_entry_created_at | ||
258 | |||
259 | SQLite | ||
260 | ^^^^^^ | ||
261 | |||
262 | Migration up | ||
263 | """""""""""" | ||
264 | |||
265 | .. code-block:: sql | ||
266 | |||
267 | DROP INDEX created_at_idx | ||
268 | DROP INDEX IDX_F4D18282A76ED395 | ||
269 | CREATE TEMPORARY TABLE __temp__wallabag_entry AS SELECT id, user_id, uuid, title, url, is_archived, is_starred, content, created_at, updated_at, mimetype, language, reading_time, domain_name, preview_picture, is_public FROM wallabag_entry | ||
270 | DROP TABLE wallabag_entry | ||
271 | CREATE TABLE wallabag_entry (id INTEGER NOT NULL, user_id INTEGER DEFAULT NULL, uuid CLOB DEFAULT NULL COLLATE BINARY, 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, reading_time INTEGER DEFAULT NULL, domain_name CLOB DEFAULT NULL COLLATE BINARY, preview_picture CLOB DEFAULT NULL COLLATE BINARY, is_public BOOLEAN DEFAULT '0', PRIMARY KEY(id)) | ||
272 | INSERT INTO wallabag_entry (id, user_id, uuid, title, url, is_archived, is_starred, content, created_at, updated_at, mimetype, language, reading_time, domain_name, preview_picture, is_public) SELECT id, user_id, uuid, title, url, is_archived, is_starred, content, created_at, updated_at, mimetype, language, reading_time, domain_name, preview_picture, is_public FROM __temp__wallabag_entry | ||
273 | DROP TABLE __temp__wallabag_entry | ||
274 | CREATE INDEX created_at_idx ON wallabag_entry (created_at) | ||
275 | CREATE INDEX IDX_F4D18282A76ED395 ON wallabag_entry (user_id) | ||
276 | CREATE INDEX IDX_entry_created_at ON wallabag_entry (created_at) | ||
277 | |||
278 | Migration down | ||
279 | """""""""""""" | ||
280 | |||
281 | .. code-block:: sql | ||
282 | |||
283 | DROP INDEX IDX_entry_created_at | ||
284 | DROP INDEX IDX_F4D18282A76ED395 | ||
285 | DROP INDEX created_at_idx | ||
286 | CREATE TEMPORARY TABLE __temp__wallabag_entry AS SELECT id, user_id, uuid, title, url, is_archived, is_starred, content, created_at, updated_at, mimetype, language, reading_time, domain_name, preview_picture, is_public FROM wallabag_entry | ||
287 | DROP TABLE wallabag_entry | ||
288 | CREATE TABLE wallabag_entry (id INTEGER NOT NULL, user_id INTEGER DEFAULT NULL, uuid CLOB DEFAULT NULL COLLATE BINARY, 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, reading_time INTEGER DEFAULT NULL, domain_name CLOB DEFAULT NULL COLLATE BINARY, preview_picture CLOB DEFAULT NULL COLLATE BINARY, is_public BOOLEAN DEFAULT '0', PRIMARY KEY(id)) | ||
289 | INSERT INTO wallabag_entry (id, user_id, uuid, title, url, is_archived, is_starred, content, created_at, updated_at, mimetype, language, reading_time, domain_name, preview_picture, is_public) SELECT id, user_id, uuid, title, url, is_archived, is_starred, content, created_at, updated_at, mimetype, language, reading_time, domain_name, preview_picture, is_public FROM __temp__wallabag_entry | ||
290 | DROP TABLE __temp__wallabag_entry | ||
291 | CREATE INDEX IDX_F4D18282A76ED395 ON wallabag_entry (user_id) | ||
292 | CREATE INDEX created_at_idx ON wallabag_entry (created_at) | ||
293 | |||
294 | Migration 20161106113822 | ||
295 | ------------------------ | ||
296 | |||
297 | MySQL | ||
298 | ^^^^^ | ||
299 | |||
300 | Migration up | ||
301 | """""""""""" | ||
302 | |||
303 | .. code-block:: sql | ||
304 | |||
305 | ALTER TABLE wallabag_config ADD action_mark_as_read INT DEFAULT 0 | ||
306 | |||
307 | Migration down | ||
308 | """""""""""""" | ||
309 | |||
310 | .. code-block:: sql | ||
311 | |||
312 | ALTER TABLE wallabag_config DROP action_mark_as_read | ||
313 | |||
314 | PostgreSQL | ||
315 | ^^^^^^^^^^ | ||
316 | |||
317 | Migration up | ||
318 | """""""""""" | ||
319 | |||
320 | .. code-block:: sql | ||
321 | |||
322 | ALTER TABLE wallabag_config ADD action_mark_as_read INT DEFAULT 0 | ||
323 | |||
324 | Migration down | ||
325 | """""""""""""" | ||
326 | |||
327 | .. code-block:: sql | ||
328 | |||
329 | ALTER TABLE wallabag_config DROP action_mark_as_read | ||
330 | |||
331 | SQLite | ||
332 | ^^^^^^ | ||
333 | |||
334 | Migration up | ||
335 | """""""""""" | ||
336 | |||
337 | .. code-block:: sql | ||
338 | |||
339 | ALTER TABLE wallabag_config ADD COLUMN action_mark_as_read INTEGER DEFAULT 0 | ||
340 | |||
341 | Migration down | ||
342 | """""""""""""" | ||
343 | |||
344 | .. code-block:: sql | ||
345 | |||
346 | DROP INDEX UNIQ_87E64C53A76ED395 | ||
347 | CREATE TEMPORARY TABLE __temp__wallabag_config AS SELECT id, user_id, theme, items_per_page, language, rss_token, rss_limit, reading_speed, pocket_consumer_key FROM wallabag_config | ||
348 | DROP TABLE wallabag_config | ||
349 | CREATE TABLE wallabag_config (id INTEGER 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, rss_token VARCHAR(255) DEFAULT NULL COLLATE BINARY, rss_limit INTEGER DEFAULT NULL, reading_speed DOUBLE PRECISION DEFAULT NULL, pocket_consumer_key VARCHAR(255) DEFAULT NULL COLLATE BINARY, PRIMARY KEY(id)) | ||
350 | INSERT INTO wallabag_config (id, user_id, theme, items_per_page, language, rss_token, rss_limit, reading_speed, pocket_consumer_key) SELECT id, user_id, theme, items_per_page, language, rss_token, rss_limit, reading_speed, pocket_consumer_key FROM __temp__wallabag_config | ||
351 | DROP TABLE __temp__wallabag_config | ||
352 | CREATE UNIQUE INDEX UNIQ_87E64C53A76ED395 ON wallabag_config (user_id) | ||
353 | |||
354 | Migration 20161117071626 | ||
355 | ------------------------ | ||
356 | |||
357 | MySQL | ||
358 | ^^^^^ | ||
359 | |||
360 | Migration up | ||
361 | """""""""""" | ||
362 | |||
363 | .. code-block:: sql | ||
364 | |||
365 | INSERT INTO wallabag_craue_config_setting (name, value, section) VALUES ('share_unmark', 0, 'entry') | ||
366 | INSERT INTO wallabag_craue_config_setting (name, value, section) VALUES ('unmark_url', 'https://unmark.it', 'entry') | ||
367 | |||
368 | Migration down | ||
369 | """""""""""""" | ||
370 | |||
371 | .. code-block:: sql | ||
372 | |||
373 | DELETE FROM wallabag_craue_config_setting WHERE name = 'share_unmark'; | ||
374 | DELETE FROM wallabag_craue_config_setting WHERE name = 'unmark_url'; | ||
375 | |||
376 | PostgreSQL | ||
377 | ^^^^^^^^^^ | ||
378 | |||
379 | Migration up | ||
380 | """""""""""" | ||
381 | |||
382 | .. code-block:: sql | ||
383 | |||
384 | INSERT INTO wallabag_craue_config_setting (name, value, section) VALUES ('share_unmark', 0, 'entry') | ||
385 | INSERT INTO wallabag_craue_config_setting (name, value, section) VALUES ('unmark_url', 'https://unmark.it', 'entry') | ||
386 | |||
387 | Migration down | ||
388 | """""""""""""" | ||
389 | |||
390 | .. code-block:: sql | ||
391 | |||
392 | DELETE FROM wallabag_craue_config_setting WHERE name = 'share_unmark'; | ||
393 | DELETE FROM wallabag_craue_config_setting WHERE name = 'unmark_url'; | ||
394 | |||
395 | SQLite | ||
396 | ^^^^^^ | ||
397 | |||
398 | Migration up | ||
399 | """""""""""" | ||
400 | |||
401 | .. code-block:: sql | ||
402 | |||
403 | INSERT INTO wallabag_craue_config_setting (name, value, section) VALUES ('share_unmark', 0, 'entry') | ||
404 | INSERT INTO wallabag_craue_config_setting (name, value, section) VALUES ('unmark_url', 'https://unmark.it', 'entry') | ||
405 | |||
406 | Migration down | ||
407 | """""""""""""" | ||
408 | |||
409 | .. code-block:: sql | ||
410 | |||
411 | DELETE FROM wallabag_craue_config_setting WHERE name = 'share_unmark'; | ||
412 | DELETE FROM wallabag_craue_config_setting WHERE name = 'unmark_url'; | ||
413 | |||
414 | Migration 20161118134328 | ||
415 | ------------------------ | ||
416 | |||
417 | MySQL | ||
418 | ^^^^^ | ||
419 | |||
420 | Migration up | ||
421 | """""""""""" | ||
422 | |||
423 | .. code-block:: sql | ||
424 | |||
425 | ALTER TABLE wallabag_entry ADD http_status VARCHAR(3) DEFAULT NULL | ||
426 | |||
427 | Migration down | ||
428 | """""""""""""" | ||
429 | |||
430 | .. code-block:: sql | ||
431 | |||
432 | ALTER TABLE wallabag_entry DROP http_status | ||
433 | |||
434 | PostgreSQL | ||
435 | ^^^^^^^^^^ | ||
436 | |||
437 | Migration up | ||
438 | """""""""""" | ||
439 | |||
440 | .. code-block:: sql | ||
441 | |||
442 | ALTER TABLE wallabag_entry ADD http_status VARCHAR(3) DEFAULT NULL | ||
443 | |||
444 | Migration down | ||
445 | """""""""""""" | ||
446 | |||
447 | .. code-block:: sql | ||
448 | |||
449 | ALTER TABLE wallabag_entry DROP http_status | ||
450 | |||
451 | SQLite | ||
452 | ^^^^^^ | ||
453 | |||
454 | Migration up | ||
455 | """""""""""" | ||
456 | |||
457 | .. code-block:: sql | ||
458 | |||
459 | ALTER TABLE wallabag_entry ADD COLUMN http_status VARCHAR(3) DEFAULT NULL | ||
460 | |||
461 | Migration down | ||
462 | """""""""""""" | ||
463 | |||
464 | .. code-block:: sql | ||
465 | |||
466 | DROP INDEX created_at_idx | ||
467 | DROP INDEX IDX_F4D18282A76ED395 | ||
468 | CREATE TEMPORARY TABLE __temp__wallabag_entry AS SELECT id, user_id, uuid, title, url, is_archived, is_starred, content, created_at, updated_at, mimetype, language, reading_time, domain_name, preview_picture, is_public FROM wallabag_entry | ||
469 | DROP TABLE wallabag_entry | ||
470 | CREATE TABLE wallabag_entry (id INTEGER NOT NULL, user_id INTEGER DEFAULT NULL, uuid CLOB DEFAULT NULL COLLATE BINARY, 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, reading_time INTEGER DEFAULT NULL, domain_name CLOB DEFAULT NULL COLLATE BINARY, preview_picture CLOB DEFAULT NULL COLLATE BINARY, is_public BOOLEAN DEFAULT '0', PRIMARY KEY(id)) | ||
471 | INSERT INTO wallabag_entry (id, user_id, uuid, title, url, is_archived, is_starred, content, created_at, updated_at, mimetype, language, reading_time, domain_name, preview_picture, is_public) SELECT id, user_id, uuid, title, url, is_archived, is_starred, content, created_at, updated_at, mimetype, language, reading_time, domain_name, preview_picture, is_public FROM __temp__wallabag_entry | ||
472 | DROP TABLE __temp__wallabag_entry | ||
473 | CREATE INDEX created_at_idx ON wallabag_entry (created_at) | ||
474 | CREATE INDEX IDX_F4D18282A76ED395 ON wallabag_entry (user_id) | ||
475 | |||
476 | Migration 20161122144743 | ||
477 | ------------------------ | ||
478 | |||
479 | MySQL | ||
480 | ^^^^^ | ||
481 | |||
482 | Migration up | ||
483 | """""""""""" | ||
484 | |||
485 | .. code-block:: sql | ||
486 | |||
487 | INSERT INTO wallabag_craue_config_setting (name, value, section) VALUES ('restricted_access', 0, 'entry') | ||
488 | |||
489 | Migration down | ||
490 | """""""""""""" | ||
491 | |||
492 | .. code-block:: sql | ||
493 | |||
494 | DELETE FROM wallabag_craue_config_setting WHERE name = 'restricted_access'; | ||
495 | |||
496 | PostgreSQL | ||
497 | ^^^^^^^^^^ | ||
498 | |||
499 | Migration up | ||
500 | """""""""""" | ||
501 | |||
502 | .. code-block:: sql | ||
503 | |||
504 | INSERT INTO wallabag_craue_config_setting (name, value, section) VALUES ('restricted_access', 0, 'entry') | ||
505 | |||
506 | Migration down | ||
507 | """""""""""""" | ||
508 | |||
509 | .. code-block:: sql | ||
510 | |||
511 | DELETE FROM wallabag_craue_config_setting WHERE name = 'restricted_access'; | ||
512 | |||
513 | SQLite | ||
514 | ^^^^^^ | ||
515 | |||
516 | Migration up | ||
517 | """""""""""" | ||
518 | |||
519 | .. code-block:: sql | ||
520 | |||
521 | INSERT INTO wallabag_craue_config_setting (name, value, section) VALUES ('restricted_access', 0, 'entry') | ||
522 | |||
523 | Migration down | ||
524 | """""""""""""" | ||
525 | |||
526 | .. code-block:: sql | ||
527 | |||
528 | DELETE FROM wallabag_craue_config_setting WHERE name = 'restricted_access'; | ||
529 | |||
530 | Migration 20161122203647 | ||
531 | ------------------------ | ||
532 | |||
533 | MySQL | ||
534 | ^^^^^ | ||
535 | |||
536 | Migration up | ||
537 | """""""""""" | ||
538 | |||
539 | .. code-block:: sql | ||
540 | |||
541 | ALTER TABLE wallabag_user DROP expired, DROP credentials_expired | ||
542 | |||
543 | Migration down | ||
544 | """""""""""""" | ||
545 | |||
546 | .. code-block:: sql | ||
547 | |||
548 | ALTER TABLE wallabag_user ADD expired SMALLINT DEFAULT NULL, ADD credentials_expired SMALLINT DEFAULT NULL | ||
549 | |||
550 | PostgreSQL | ||
551 | ^^^^^^^^^^ | ||
552 | |||
553 | Migration up | ||
554 | """""""""""" | ||
555 | |||
556 | .. code-block:: sql | ||
557 | |||
558 | ALTER TABLE wallabag_user DROP expired | ||
559 | ALTER TABLE wallabag_user DROP credentials_expired | ||
560 | |||
561 | Migration down | ||
562 | """""""""""""" | ||
563 | |||
564 | .. code-block:: sql | ||
565 | |||
566 | ALTER TABLE wallabag_user ADD expired SMALLINT DEFAULT NULL | ||
567 | ALTER TABLE wallabag_user ADD credentials_expired SMALLINT DEFAULT NULL | ||
568 | |||
569 | SQLite | ||
570 | ^^^^^^ | ||
571 | |||
572 | Migration up | ||
573 | """""""""""" | ||
574 | |||
575 | .. code-block:: sql | ||
576 | |||
577 | DROP INDEX UNIQ_1D63E7E5C05FB297 | ||
578 | DROP INDEX UNIQ_1D63E7E5A0D96FBF | ||
579 | DROP INDEX UNIQ_1D63E7E592FC23A8 | ||
580 | CREATE TEMPORARY TABLE __temp__wallabag_user AS SELECT id, username, username_canonical, email, email_canonical, enabled, salt, password, last_login, locked, expires_at, confirmation_token, password_requested_at, roles, credentials_expire_at, name, created_at, updated_at, authCode, twoFactorAuthentication, trusted FROM wallabag_user | ||
581 | DROP TABLE wallabag_user | ||
582 | CREATE TABLE wallabag_user (id INTEGER 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, salt VARCHAR(255) NOT NULL COLLATE BINARY, password VARCHAR(255) NOT NULL COLLATE BINARY, last_login DATETIME DEFAULT NULL, locked BOOLEAN NOT NULL, expires_at DATETIME DEFAULT NULL, confirmation_token VARCHAR(180) DEFAULT NULL COLLATE BINARY, password_requested_at DATETIME DEFAULT NULL, roles CLOB NOT NULL COLLATE BINARY, credentials_expire_at DATETIME DEFAULT NULL, name CLOB DEFAULT NULL COLLATE BINARY, created_at DATETIME NOT NULL, updated_at DATETIME NOT NULL, authCode INTEGER DEFAULT NULL, twoFactorAuthentication BOOLEAN NOT NULL, trusted CLOB DEFAULT NULL COLLATE BINARY, PRIMARY KEY(id)) | ||
583 | INSERT INTO wallabag_user (id, username, username_canonical, email, email_canonical, enabled, salt, password, last_login, locked, expires_at, confirmation_token, password_requested_at, roles, credentials_expire_at, name, created_at, updated_at, authCode, twoFactorAuthentication, trusted) SELECT id, username, username_canonical, email, email_canonical, enabled, salt, password, last_login, locked, expires_at, confirmation_token, password_requested_at, roles, credentials_expire_at, name, created_at, updated_at, authCode, twoFactorAuthentication, trusted FROM __temp__wallabag_user | ||
584 | DROP TABLE __temp__wallabag_user | ||
585 | CREATE UNIQUE INDEX UNIQ_1D63E7E5C05FB297 ON wallabag_user (confirmation_token) | ||
586 | CREATE UNIQUE INDEX UNIQ_1D63E7E5A0D96FBF ON wallabag_user (email_canonical) | ||
587 | CREATE UNIQUE INDEX UNIQ_1D63E7E592FC23A8 ON wallabag_user (username_canonical) | ||
588 | |||
589 | Migration down | ||
590 | """""""""""""" | ||
591 | |||
592 | .. code-block:: sql | ||
593 | |||
594 | ALTER TABLE wallabag_user ADD COLUMN expired SMALLINT DEFAULT NULL | ||
595 | ALTER TABLE wallabag_user ADD COLUMN credentials_expired SMALLINT DEFAULT NULL | ||
596 | |||
597 | Migration 20161128084725 | ||
598 | ------------------------ | ||
599 | |||
600 | MySQL | ||
601 | ^^^^^ | ||
602 | |||
603 | Migration up | ||
604 | """""""""""" | ||
605 | |||
606 | .. code-block:: sql | ||
607 | |||
608 | ALTER TABLE wallabag_config ADD list_mode INT DEFAULT NULL | ||
609 | |||
610 | Migration down | ||
611 | """""""""""""" | ||
612 | |||
613 | .. code-block:: sql | ||
614 | |||
615 | ALTER TABLE wallabag_config DROP list_mode | ||
616 | |||
617 | PostgreSQL | ||
618 | ^^^^^^^^^^ | ||
619 | |||
620 | Migration up | ||
621 | """""""""""" | ||
622 | |||
623 | .. code-block:: sql | ||
624 | |||
625 | ALTER TABLE wallabag_config ADD list_mode INT DEFAULT NULL | ||
626 | |||
627 | Migration down | ||
628 | """""""""""""" | ||
629 | |||
630 | .. code-block:: sql | ||
631 | |||
632 | ALTER TABLE wallabag_config DROP list_mode | ||
633 | |||
634 | SQLite | ||
635 | ^^^^^^ | ||
636 | |||
637 | Migration up | ||
638 | """""""""""" | ||
639 | |||
640 | .. code-block:: sql | ||
641 | |||
642 | ALTER TABLE wallabag_config ADD COLUMN list_mode INTEGER DEFAULT NULL | ||
643 | |||
644 | Migration down | ||
645 | """""""""""""" | ||
646 | |||
647 | .. code-block:: sql | ||
648 | |||
649 | DROP INDEX UNIQ_87E64C53A76ED395 | ||
650 | CREATE TEMPORARY TABLE __temp__wallabag_config AS SELECT id, user_id, theme, items_per_page, language, rss_token, rss_limit, reading_speed, pocket_consumer_key FROM wallabag_config | ||
651 | DROP TABLE wallabag_config | ||
652 | CREATE TABLE wallabag_config (id INTEGER 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, rss_token VARCHAR(255) DEFAULT NULL COLLATE BINARY, rss_limit INTEGER DEFAULT NULL, reading_speed DOUBLE PRECISION DEFAULT NULL, pocket_consumer_key VARCHAR(255) DEFAULT NULL COLLATE BINARY, PRIMARY KEY(id)) | ||
653 | INSERT INTO wallabag_config (id, user_id, theme, items_per_page, language, rss_token, rss_limit, reading_speed, pocket_consumer_key) SELECT id, user_id, theme, items_per_page, language, rss_token, rss_limit, reading_speed, pocket_consumer_key FROM __temp__wallabag_config | ||
654 | DROP TABLE __temp__wallabag_config | ||
655 | CREATE UNIQUE INDEX UNIQ_87E64C53A76ED395 ON wallabag_config (user_id) | ||
656 | |||
657 | Migration 20161128131503 | ||
658 | ------------------------ | ||
659 | |||
660 | MySQL | ||
661 | ^^^^^ | ||
662 | |||
663 | Migration up | ||
664 | """""""""""" | ||
665 | |||
666 | .. code-block:: sql | ||
667 | |||
668 | ALTER TABLE wallabag_user DROP locked, DROP credentials_expire_at, DROP expires_at | ||
669 | |||
670 | Migration down | ||
671 | """""""""""""" | ||
672 | |||
673 | .. code-block:: sql | ||
674 | |||
675 | ALTER TABLE wallabag_user ADD locked SMALLINT DEFAULT NULL, ADD credentials_expire_at DATETIME DEFAULT NULL, ADD expires_at DATETIME DEFAULT NULL | ||
676 | |||
677 | PostgreSQL | ||
678 | ^^^^^^^^^^ | ||
679 | |||
680 | Migration up | ||
681 | """""""""""" | ||
682 | |||
683 | .. code-block:: sql | ||
684 | |||
685 | ALTER TABLE wallabag_user DROP locked | ||
686 | ALTER TABLE wallabag_user DROP credentials_expire_at | ||
687 | ALTER TABLE wallabag_user DROP expires_at | ||
688 | |||
689 | Migration down | ||
690 | """""""""""""" | ||
691 | |||
692 | .. code-block:: sql | ||
693 | |||
694 | ALTER TABLE wallabag_user ADD locked SMALLINT DEFAULT NULL | ||
695 | ALTER TABLE wallabag_user ADD credentials_expire_at TIMESTAMP(0) WITHOUT TIME ZONE DEFAULT NULL | ||
696 | ALTER TABLE wallabag_user ADD expires_at TIMESTAMP(0) WITHOUT TIME ZONE DEFAULT NULL | ||
697 | |||
698 | SQLite | ||
699 | ^^^^^^ | ||
700 | |||
701 | Migration up | ||
702 | """""""""""" | ||
703 | |||
704 | .. code-block:: sql | ||
705 | |||
706 | ALTER TABLE wallabag_user ADD COLUMN locked SMALLINT DEFAULT NULL | ||
707 | ALTER TABLE wallabag_user ADD COLUMN credentials_expire_at DATETIME DEFAULT NULL | ||
708 | ALTER TABLE wallabag_user ADD COLUMN expires_at DATETIME DEFAULT NULL | ||
709 | |||
710 | Migration down | ||
711 | """""""""""""" | ||
712 | |||
713 | .. code-block:: sql | ||
714 | |||
715 | DROP INDEX UNIQ_1D63E7E592FC23A8 | ||
716 | DROP INDEX UNIQ_1D63E7E5A0D96FBF | ||
717 | DROP INDEX UNIQ_1D63E7E5C05FB297 | ||
718 | CREATE TEMPORARY TABLE __temp__wallabag_user 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, trusted, expired, credentials_expired FROM wallabag_user | ||
719 | DROP TABLE wallabag_user | ||
720 | CREATE TABLE wallabag_user (id INTEGER 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, salt VARCHAR(255) NOT NULL COLLATE BINARY, password VARCHAR(255) NOT NULL COLLATE BINARY, last_login DATETIME DEFAULT NULL, confirmation_token VARCHAR(180) DEFAULT NULL COLLATE BINARY, password_requested_at DATETIME DEFAULT NULL, roles CLOB NOT NULL COLLATE BINARY, name CLOB DEFAULT NULL COLLATE BINARY, created_at DATETIME NOT NULL, updated_at DATETIME NOT NULL, authCode INTEGER DEFAULT NULL, twoFactorAuthentication BOOLEAN NOT NULL, trusted CLOB DEFAULT NULL COLLATE BINARY, expired SMALLINT DEFAULT NULL, credentials_expired SMALLINT DEFAULT NULL, PRIMARY KEY(id)) | ||
721 | INSERT INTO wallabag_user (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, trusted, expired, credentials_expired) 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, trusted, expired, credentials_expired FROM __temp__wallabag_user | ||
722 | DROP TABLE __temp__wallabag_user | ||
723 | CREATE UNIQUE INDEX UNIQ_1D63E7E592FC23A8 ON wallabag_user (username_canonical) | ||
724 | CREATE UNIQUE INDEX UNIQ_1D63E7E5A0D96FBF ON wallabag_user (email_canonical) | ||
725 | CREATE UNIQUE INDEX UNIQ_1D63E7E5C05FB297 ON wallabag_user (confirmation_token) | ||
726 | |||
727 | Migration 20161214094403 | ||
728 | ------------------------ | ||
729 | |||
730 | MySQL | ||
731 | ^^^^^ | ||
732 | |||
733 | Migration up | ||
734 | """""""""""" | ||
735 | |||
736 | .. code-block:: sql | ||
737 | |||
738 | CREATE INDEX IDX_entry_uid ON wallabag_entry (uid) | ||
739 | |||
740 | Migration down | ||
741 | """""""""""""" | ||
742 | |||
743 | .. code-block:: sql | ||
744 | |||
745 | DROP INDEX IDX_entry_uid ON wallabag_entry | ||
746 | |||
747 | PostgreSQL | ||
748 | ^^^^^^^^^^ | ||
749 | |||
750 | Migration up | ||
751 | """""""""""" | ||
752 | |||
753 | .. code-block:: sql | ||
754 | |||
755 | CREATE INDEX IDX_entry_uid ON wallabag_entry (uid) | ||
756 | |||
757 | Migration down | ||
758 | """""""""""""" | ||
759 | |||
760 | .. code-block:: sql | ||
761 | |||
762 | DROP INDEX idx_entry_uid | ||
763 | |||
764 | SQLite | ||
765 | ^^^^^^ | ||
766 | |||
767 | Migration up | ||
768 | """""""""""" | ||
769 | |||
770 | .. code-block:: sql | ||
771 | |||
772 | DROP INDEX IDX_F4D18282A76ED395 | ||
773 | DROP INDEX created_at_idx | ||
774 | CREATE TEMPORARY TABLE __temp__wallabag_entry AS SELECT id, user_id, uid, title, url, is_archived, is_starred, content, created_at, updated_at, mimetype, language, reading_time, domain_name, preview_picture, is_public FROM wallabag_entry | ||
775 | DROP TABLE wallabag_entry | ||
776 | CREATE TABLE wallabag_entry (id INTEGER NOT NULL, user_id INTEGER DEFAULT NULL, uid CLOB DEFAULT NULL COLLATE BINARY, 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, reading_time INTEGER DEFAULT NULL, domain_name CLOB DEFAULT NULL COLLATE BINARY, preview_picture CLOB DEFAULT NULL COLLATE BINARY, is_public BOOLEAN DEFAULT '0', PRIMARY KEY(id)) | ||
777 | INSERT INTO wallabag_entry (id, user_id, uid, title, url, is_archived, is_starred, content, created_at, updated_at, mimetype, language, reading_time, domain_name, preview_picture, is_public) SELECT id, user_id, uid, title, url, is_archived, is_starred, content, created_at, updated_at, mimetype, language, reading_time, domain_name, preview_picture, is_public FROM __temp__wallabag_entry | ||
778 | DROP TABLE __temp__wallabag_entry | ||
779 | CREATE INDEX IDX_F4D18282A76ED395 ON wallabag_entry (user_id) | ||
780 | CREATE INDEX created_at_idx ON wallabag_entry (created_at) | ||
781 | CREATE INDEX IDX_entry_uid ON wallabag_entry (uid) | ||
782 | |||
783 | Migration down | ||
784 | """""""""""""" | ||
785 | |||
786 | .. code-block:: sql | ||
787 | |||
788 | DROP INDEX IDX_entry_uid | ||
789 | DROP INDEX created_at_idx | ||
790 | DROP INDEX IDX_F4D18282A76ED395 | ||
791 | CREATE TEMPORARY TABLE __temp__wallabag_entry AS SELECT id, user_id, uid, title, url, is_archived, is_starred, content, created_at, updated_at, mimetype, language, reading_time, domain_name, preview_picture, is_public FROM wallabag_entry | ||
792 | DROP TABLE wallabag_entry | ||
793 | CREATE TABLE wallabag_entry (id INTEGER NOT NULL, user_id INTEGER DEFAULT NULL, uid CLOB DEFAULT NULL COLLATE BINARY, 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, reading_time INTEGER DEFAULT NULL, domain_name CLOB DEFAULT NULL COLLATE BINARY, preview_picture CLOB DEFAULT NULL COLLATE BINARY, is_public BOOLEAN DEFAULT '0', PRIMARY KEY(id)) | ||
794 | INSERT INTO wallabag_entry (id, user_id, uid, title, url, is_archived, is_starred, content, created_at, updated_at, mimetype, language, reading_time, domain_name, preview_picture, is_public) SELECT id, user_id, uid, title, url, is_archived, is_starred, content, created_at, updated_at, mimetype, language, reading_time, domain_name, preview_picture, is_public FROM __temp__wallabag_entry | ||
795 | DROP TABLE __temp__wallabag_entry | ||
796 | CREATE INDEX created_at_idx ON wallabag_entry (created_at) | ||
797 | CREATE INDEX IDX_F4D18282A76ED395 ON wallabag_entry (user_id) | ||
diff --git a/docs/de/user/upgrade.rst b/docs/de/user/upgrade.rst index fbbf29f4..1107616e 100644 --- a/docs/de/user/upgrade.rst +++ b/docs/de/user/upgrade.rst | |||
@@ -3,42 +3,53 @@ wallabag-Installation aktualisieren | |||
3 | 3 | ||
4 | Du wirst hier mehrere Wege finden, um deine wallabag zu aktualisieren: | 4 | Du wirst hier mehrere Wege finden, um deine wallabag zu aktualisieren: |
5 | 5 | ||
6 | - `von 2.1.x zu 2.2.x <#upgrade-von-2-1-x-zu-2-2-x>`_ | ||
6 | - `von 2.0.x zu 2.1.1 <#upgrade-von-2-0-x-zu-2-1-1>`_ | 7 | - `von 2.0.x zu 2.1.1 <#upgrade-von-2-0-x-zu-2-1-1>`_ |
7 | - `von 2.1.x zu 2.1.y <#upgrade-von-2-1-x-zu-2-1-y>`_ | ||
8 | - `von 1.x zu 2.x <#upgrade-von-1-x>`_ | 8 | - `von 1.x zu 2.x <#upgrade-von-1-x>`_ |
9 | 9 | ||
10 | Upgrade von 2.0.x zu 2.1.1 | 10 | Upgrade von 2.1.x zu 2.2.x |
11 | --------------------------- | 11 | -------------------------- |
12 | |||
13 | .. warning:: | ||
14 | |||
15 | Mache eine Sicherung deines Pocket-Consumer-Key, falls hinzugefügt, da dieser nach dem Upgrade erneut hinzugefügt werden muss. | ||
16 | 12 | ||
17 | Upgrade auf einem dedizierten Webserver | 13 | Upgrade auf einem dedizierten Webserver |
18 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | 14 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
19 | 15 | ||
20 | :: | 16 | :: |
21 | 17 | ||
22 | rm -rf var/cache/* | 18 | make update |
23 | git fetch origin | 19 | |
24 | git fetch --tags | 20 | Erklärungen über die Datenbankmigration |
25 | git checkout 2.1.1 --force | 21 | """"""""""""""""""""""""""""""""""""""" |
26 | SYMFONY_ENV=prod composer install --no-dev -o --prefer-dist | 22 | |
27 | php bin/console doctrine:migrations:migrate --env=prod | 23 | Während des Updates migrieren wir die Datenbank. |
28 | php bin/console cache:clear --env=prod | 24 | |
25 | Alle Datenbankmigrationen sind im Verzeichnis ``app/DoctrineMigrations`` gespeichert. Jede von ihnen kann einzeln ausgeführt werden: | ||
26 | ``bin/console doctrine:migrations:execute 20161001072726 --env=prod``. | ||
27 | |||
28 | Dies ist die Migrationsliste von 2.1.x auf 2.2.0: | ||
29 | |||
30 | * ``20161001072726``: Fremdschlüssel für das Zurücksetzen des Kontos hinzugefügt | ||
31 | * ``20161022134138``: Datenbank zum ``utf8mb4``-Encoding ändern (nur für MySQL) | ||
32 | * ``20161024212538``: ``user_id``-Spalte zu ``oauth2_clients`` hinzugefügt, um Benutzer davon abzuhalten, API-Clients anderer Nutzer zu löschen | ||
33 | * ``20161031132655``: Interne Einstellung für das (de-)aktivieren vom Bilder-Download hinzugefügt | ||
34 | * ``20161104073720``: ``created_at``-Index zur ``entry``-Tabelle hinzugefügt | ||
35 | * ``20161106113822``: ``action_mark_as_read``-Feld zur ``config``-Tabelle hinzugefügt | ||
36 | * ``20161117071626``: Interne Einstellung zum Teilen mit unmark.it hinzugefügt | ||
37 | * ``20161118134328``: ``http_status``-Feld zur ``entry``-Tabelle hinzugefügt | ||
38 | * ``20161122144743``: Interne Einstellung für das (de-)aktivieren zum Holen von Artikeln mit einer Paywall hinzugefügt | ||
39 | * ``20161122203647``: ``expired``- und ``credentials_expired``-Feld aus der ``user``-Tabelle entfernt | ||
29 | 40 | ||
30 | Upgrade auf einem Shared Hosting | 41 | Upgrade auf einem Shared Hosting |
31 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | 42 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
32 | 43 | ||
33 | Sichere deine ``app/config/parameters.yml``-Datei. | 44 | Sichere deine ``app/config/parameters.yml``-Datei. |
34 | 45 | ||
35 | Lade das 2.1.1-Release von wallabag herunter: | 46 | Lade das letzte Release von wallabag herunter: |
36 | 47 | ||
37 | .. code-block:: bash | 48 | .. code-block:: bash |
38 | 49 | ||
39 | wget https://framabag.org/wallabag-release-2.1.1.tar.gz && tar xvf wallabag-release-2.1.1.tar.gz | 50 | wget http://wllbg.org/latest-v2-package && tar xvf latest-v2-package |
40 | 51 | ||
41 | (md5 hash of the 2.1.1 package: ``9584a3b60a2b2a4de87f536548caac93``) | 52 | Du findest den `aktuellen MD5-Hash auf unserer Webseite <https://www.wallabag.org/pages/download-wallabag.html>`_. |
42 | 53 | ||
43 | Extrahiere das Archiv in deinen wallabag-Ordner und ersetze die ``app/config/parameters.yml`` mit deiner. | 54 | Extrahiere das Archiv in deinen wallabag-Ordner und ersetze die ``app/config/parameters.yml`` mit deiner. |
44 | 55 | ||
@@ -48,42 +59,42 @@ Falls du SQLite nutzt, musst du außerdem deinen ``data/``-Ordner in die neue In | |||
48 | 59 | ||
49 | Leere den ``var/cache``-Ordner. | 60 | Leere den ``var/cache``-Ordner. |
50 | 61 | ||
51 | Du musst einige SQL-Abfragen durchführen, um deine Datenbank zu aktualisieren. Wir gehen in diesem Fall davon aus, dass das Tabellenpräfix ``wallabag_`` ist und eine MySQL-Datenbank verwendet wird: | 62 | Du musst einige SQL-Abfragen durchführen, um deine Datenbank zu aktualisieren. Wir gehen in diesem Fall davon aus, dass das Tabellenpräfix ``wallabag_`` ist. |
52 | 63 | ||
53 | .. code-block:: sql | 64 | `You can find all the queries here <http://doc.wallabag.org/en/master/user/query-upgrade-21-22.html>`_. |
54 | 65 | ||
55 | ALTER TABLE `wallabag_entry` ADD `uuid` LONGTEXT DEFAULT NULL; | 66 | Upgrade von 2.0.x zu 2.1.1 |
56 | INSERT INTO `wallabag_craue_config_setting` (`name`, `value`, `section`) VALUES ('share_public', '1', 'entry'); | 67 | --------------------------- |
57 | ALTER TABLE `wallabag_oauth2_clients` ADD name longtext COLLATE 'utf8_unicode_ci' DEFAULT NULL; | 68 | |
58 | INSERT INTO `wallabag_craue_config_setting` (`name`, `value`, `section`) VALUES ('import_with_redis', '0', 'import'); | 69 | .. warning:: |
59 | INSERT INTO `wallabag_craue_config_setting` (`name`, `value`, `section`) VALUES ('import_with_rabbitmq', '0', 'import'); | ||
60 | ALTER TABLE `wallabag_config` ADD `pocket_consumer_key` VARCHAR(255) DEFAULT NULL; | ||
61 | DELETE FROM `wallabag_craue_config_setting` WHERE `name` = 'pocket_consumer_key'; | ||
62 | 70 | ||
63 | Upgrade von 2.1.x zu 2.1.y | 71 | Mache eine Sicherung deines Pocket-Consumer-Key, falls hinzugefügt, da dieser nach dem Upgrade erneut hinzugefügt werden muss. |
64 | ----------------------------- | ||
65 | 72 | ||
66 | Upgrade auf einem dedizierten Webserver | 73 | Upgrade auf einem dedizierten Webserver |
67 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | 74 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
68 | 75 | ||
69 | Um deine wallabag-Installation auf die letzte Version zu aktualisieren, führe den folgenden Befehl in deinem wallabag-Ordner aus: | ||
70 | |||
71 | :: | 76 | :: |
72 | 77 | ||
73 | make update | 78 | rm -rf var/cache/* |
79 | git fetch origin | ||
80 | git fetch --tags | ||
81 | git checkout 2.1.1 --force | ||
82 | SYMFONY_ENV=prod composer install --no-dev -o --prefer-dist | ||
83 | php bin/console doctrine:migrations:migrate --env=prod | ||
84 | php bin/console cache:clear --env=prod | ||
74 | 85 | ||
75 | Upgrade auf einem Shared Hosting | 86 | Upgrade auf einem Shared Hosting |
76 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | 87 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
77 | 88 | ||
78 | Sichere deine ``app/config/parameters.yml``-Datei. | 89 | Sichere deine ``app/config/parameters.yml``-Datei. |
79 | 90 | ||
80 | Lade das letzte Release von wallabag herunter: | 91 | Lade das 2.1.1-Release von wallabag herunter: |
81 | 92 | ||
82 | .. code-block:: bash | 93 | .. code-block:: bash |
83 | 94 | ||
84 | wget https://wllbg.org/latest-v2-package && tar xvf latest-v2-package | 95 | wget http://framabag.org/wallabag-release-2.1.1.tar.gz && tar xvf wallabag-release-2.1.1.tar.gz |
85 | 96 | ||
86 | Du findest den `aktuellen MD5-Hash auf unserer Webseite <https://www.wallabag.org/pages/download-wallabag.html>`_. | 97 | (md5 hash of the 2.1.1 package: ``9584a3b60a2b2a4de87f536548caac93``) |
87 | 98 | ||
88 | Extrahiere das Archiv in deinen wallabag-Ordner und ersetze die ``app/config/parameters.yml`` mit deiner. | 99 | Extrahiere das Archiv in deinen wallabag-Ordner und ersetze die ``app/config/parameters.yml`` mit deiner. |
89 | 100 | ||
@@ -93,6 +104,18 @@ Falls du SQLite nutzt, musst du außerdem deinen ``data/``-Ordner in die neue In | |||
93 | 104 | ||
94 | Leere den ``var/cache``-Ordner. | 105 | Leere den ``var/cache``-Ordner. |
95 | 106 | ||
107 | Du musst einige SQL-Abfragen durchführen, um deine Datenbank zu aktualisieren. Wir gehen in diesem Fall davon aus, dass das Tabellenpräfix ``wallabag_`` ist und eine MySQL-Datenbank verwendet wird: | ||
108 | |||
109 | .. code-block:: sql | ||
110 | |||
111 | ALTER TABLE `wallabag_entry` ADD `uuid` LONGTEXT DEFAULT NULL; | ||
112 | INSERT INTO `wallabag_craue_config_setting` (`name`, `value`, `section`) VALUES ('share_public', '1', 'entry'); | ||
113 | ALTER TABLE `wallabag_oauth2_clients` ADD name longtext COLLATE 'utf8_unicode_ci' DEFAULT NULL; | ||
114 | INSERT INTO `wallabag_craue_config_setting` (`name`, `value`, `section`) VALUES ('import_with_redis', '0', 'import'); | ||
115 | INSERT INTO `wallabag_craue_config_setting` (`name`, `value`, `section`) VALUES ('import_with_rabbitmq', '0', 'import'); | ||
116 | ALTER TABLE `wallabag_config` ADD `pocket_consumer_key` VARCHAR(255) DEFAULT NULL; | ||
117 | DELETE FROM `wallabag_craue_config_setting` WHERE `name` = 'pocket_consumer_key'; | ||
118 | |||
96 | Upgrade von 1.x | 119 | Upgrade von 1.x |
97 | --------------- | 120 | --------------- |
98 | 121 | ||
@@ -100,4 +123,4 @@ Es gibt kein automatisiertes Skript, um wallabag 1.x auf wallabag 2.x zu aktuali | |||
100 | 123 | ||
101 | - deine Daten exportieren | 124 | - deine Daten exportieren |
102 | - wallabag 2.x installieren (Dokumentation <http://doc.wallabag.org/en/master/user/installation.html>`_ ) | 125 | - wallabag 2.x installieren (Dokumentation <http://doc.wallabag.org/en/master/user/installation.html>`_ ) |
103 | - die Daten in die neue Installation importieren (`Dokumentation <http://doc.wallabag.org/en/master/user/import.html>`_ ) \ No newline at end of file | 126 | - die Daten in die neue Installation importieren (`Dokumentation <http://doc.wallabag.org/en/master/user/import.html>`_ ) |
diff --git a/docs/en/user/query-upgrade-21-22.rst b/docs/en/user/query-upgrade-21-22.rst new file mode 100644 index 00000000..cd201dc2 --- /dev/null +++ b/docs/en/user/query-upgrade-21-22.rst | |||
@@ -0,0 +1,797 @@ | |||
1 | Migration 20161001072726 | ||
2 | ------------------------ | ||
3 | |||
4 | MySQL | ||
5 | ^^^^^ | ||
6 | |||
7 | Migration up | ||
8 | """""""""""" | ||
9 | |||
10 | .. code-block:: sql | ||
11 | |||
12 | ALTER TABLE wallabag_entry_tag DROP FOREIGN KEY FK_C9F0DD7CBA364942 | ||
13 | ALTER TABLE wallabag_entry_tag DROP FOREIGN KEY FK_C9F0DD7CBAD26311 | ||
14 | ALTER TABLE wallabag_entry_tag ADD CONSTRAINT FK_entry_tag_entry FOREIGN KEY (entry_id) REFERENCES wallabag_entry (id) ON DELETE CASCADE | ||
15 | ALTER TABLE wallabag_entry_tag ADD CONSTRAINT FK_entry_tag_tag FOREIGN KEY (tag_id) REFERENCES wallabag_tag (id) ON DELETE CASCADE | ||
16 | ALTER TABLE wallabag_annotation DROP FOREIGN KEY FK_A7AED006BA364942 | ||
17 | ALTER TABLE wallabag_annotation ADD CONSTRAINT FK_annotation_entry FOREIGN KEY (entry_id) REFERENCES wallabag_entry (id) ON DELETE CASCADE | ||
18 | |||
19 | Migration down | ||
20 | """""""""""""" | ||
21 | |||
22 | We didn't write down migration for ``20161001072726``. | ||
23 | |||
24 | PostgreSQL | ||
25 | ^^^^^^^^^^ | ||
26 | |||
27 | Migration up | ||
28 | """""""""""" | ||
29 | |||
30 | .. code-block:: sql | ||
31 | |||
32 | ALTER TABLE wallabag_entry_tag DROP CONSTRAINT fk_c9f0dd7cba364942 | ||
33 | ALTER TABLE wallabag_entry_tag DROP CONSTRAINT fk_c9f0dd7cbad26311 | ||
34 | ALTER TABLE wallabag_entry_tag ADD CONSTRAINT FK_entry_tag_entry FOREIGN KEY (entry_id) REFERENCES wallabag_entry (id) ON DELETE CASCADE | ||
35 | ALTER TABLE wallabag_entry_tag ADD CONSTRAINT FK_entry_tag_tag FOREIGN KEY (tag_id) REFERENCES wallabag_tag (id) ON DELETE CASCADE | ||
36 | ALTER TABLE wallabag_annotation DROP CONSTRAINT fk_a7aed006ba364942 | ||
37 | ALTER TABLE wallabag_annotation ADD CONSTRAINT FK_annotation_entry FOREIGN KEY (entry_id) REFERENCES wallabag_entry (id) ON DELETE CASCADE | ||
38 | |||
39 | Migration down | ||
40 | """""""""""""" | ||
41 | |||
42 | We didn't write down migration for ``20161001072726``. | ||
43 | |||
44 | SQLite | ||
45 | ^^^^^^ | ||
46 | |||
47 | This migration can only be executed safely on MySQL or PostgreSQL. | ||
48 | |||
49 | Migration 20161022134138 | ||
50 | ------------------------ | ||
51 | |||
52 | MySQL | ||
53 | ^^^^^ | ||
54 | |||
55 | Migration up | ||
56 | """""""""""" | ||
57 | |||
58 | .. code-block:: sql | ||
59 | |||
60 | ALTER DATABASE wallabag CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci; | ||
61 | ALTER TABLE wallabag_user CHANGE confirmation_token confirmation_token VARCHAR(180) DEFAULT NULL; | ||
62 | ALTER TABLE wallabag_user CHANGE salt salt VARCHAR(180) NOT NULL; | ||
63 | ALTER TABLE wallabag_user CHANGE password password VARCHAR(180) NOT NULL; | ||
64 | ALTER TABLE wallabag_annotation CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci; | ||
65 | ALTER TABLE wallabag_entry CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci; | ||
66 | ALTER TABLE wallabag_tag CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci; | ||
67 | ALTER TABLE wallabag_user CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci; | ||
68 | ALTER TABLE wallabag_annotation CHANGE `text` `text` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci; | ||
69 | ALTER TABLE wallabag_annotation CHANGE `quote` `quote` VARCHAR(191) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci; | ||
70 | ALTER TABLE wallabag_entry CHANGE `title` `title` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci; | ||
71 | ALTER TABLE wallabag_entry CHANGE `content` `content` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci; | ||
72 | ALTER TABLE wallabag_tag CHANGE `label` `label` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci; | ||
73 | ALTER TABLE wallabag_user CHANGE `name` `name` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci; | ||
74 | |||
75 | Migration down | ||
76 | """""""""""""" | ||
77 | |||
78 | .. code-block:: sql | ||
79 | |||
80 | ALTER DATABASE wallabag CHARACTER SET = utf8 COLLATE = utf8_unicode_ci; | ||
81 | ALTER TABLE wallabag_annotation CONVERT TO CHARACTER SET utf8 COLLATE utf8_unicode_ci; | ||
82 | ALTER TABLE wallabag_entry CONVERT TO CHARACTER SET utf8 COLLATE utf8_unicode_ci; | ||
83 | ALTER TABLE wallabag_tag CONVERT TO CHARACTER SET utf8 COLLATE utf8_unicode_ci; | ||
84 | ALTER TABLE wallabag_user CONVERT TO CHARACTER SET utf8 COLLATE utf8_unicode_ci; | ||
85 | ALTER TABLE wallabag_annotation CHANGE `text` `text` longtext CHARACTER SET utf8 COLLATE utf8_unicode_ci; | ||
86 | ALTER TABLE wallabag_annotation CHANGE `quote` `quote` VARCHAR(255) CHARACTER SET utf8 COLLATE utf8_unicode_ci; | ||
87 | ALTER TABLE wallabag_entry CHANGE `title` `title` longtext CHARACTER SET utf8 COLLATE utf8_unicode_ci; | ||
88 | ALTER TABLE wallabag_entry CHANGE `content` `content` longtext CHARACTER SET utf8 COLLATE utf8_unicode_ci; | ||
89 | ALTER TABLE wallabag_tag CHANGE `label` `label` longtext CHARACTER SET utf8 COLLATE utf8_unicode_ci; | ||
90 | ALTER TABLE wallabag_user CHANGE `name` `name` longtext CHARACTER SET utf8 COLLATE utf8_unicode_ci; | ||
91 | |||
92 | PostgreSQL and SQLite | ||
93 | ^^^^^^^^^^^^^^^^^^^^^ | ||
94 | |||
95 | This migration only apply to MySQL. | ||
96 | |||
97 | Migration 20161024212538 | ||
98 | ------------------------ | ||
99 | |||
100 | MySQL | ||
101 | ^^^^^ | ||
102 | |||
103 | Migration up | ||
104 | """""""""""" | ||
105 | |||
106 | .. code-block:: sql | ||
107 | |||
108 | ALTER TABLE wallabag_oauth2_clients ADD user_id INT NOT NULL | ||
109 | ALTER TABLE wallabag_oauth2_clients ADD CONSTRAINT IDX_user_oauth_client FOREIGN KEY (user_id) REFERENCES wallabag_user (id) ON DELETE CASCADE | ||
110 | CREATE INDEX IDX_635D765EA76ED395 ON wallabag_oauth2_clients (user_id) | ||
111 | |||
112 | Migration down | ||
113 | """""""""""""" | ||
114 | |||
115 | .. code-block:: sql | ||
116 | |||
117 | ALTER TABLE wallabag_oauth2_clients DROP FOREIGN KEY IDX_user_oauth_client | ||
118 | ALTER TABLE wallabag_oauth2_clients DROP user_id | ||
119 | |||
120 | PostgreSQL | ||
121 | ^^^^^^^^^^ | ||
122 | |||
123 | Migration up | ||
124 | """""""""""" | ||
125 | |||
126 | .. code-block:: sql | ||
127 | |||
128 | ALTER TABLE wallabag_oauth2_clients ADD user_id INT DEFAULT NULL | ||
129 | ALTER TABLE wallabag_oauth2_clients ADD CONSTRAINT IDX_user_oauth_client FOREIGN KEY (user_id) REFERENCES wallabag_user (id) ON DELETE CASCADE NOT DEFERRABLE INITIALLY IMMEDIATE | ||
130 | CREATE INDEX IDX_635D765EA76ED395 ON wallabag_oauth2_clients (user_id) | ||
131 | |||
132 | |||
133 | Migration down | ||
134 | """""""""""""" | ||
135 | |||
136 | .. code-block:: sql | ||
137 | |||
138 | ALTER TABLE wallabag_oauth2_clients DROP CONSTRAINT idx_user_oauth_client | ||
139 | ALTER TABLE wallabag_oauth2_clients DROP user_id | ||
140 | |||
141 | SQLite | ||
142 | ^^^^^^ | ||
143 | |||
144 | Migration up | ||
145 | """""""""""" | ||
146 | |||
147 | .. code-block:: sql | ||
148 | |||
149 | CREATE TEMPORARY TABLE __temp__wallabag_oauth2_clients AS SELECT id, random_id, redirect_uris, secret, allowed_grant_types, name FROM wallabag_oauth2_clients | ||
150 | DROP TABLE wallabag_oauth2_clients | ||
151 | CREATE TABLE wallabag_oauth2_clients (id INTEGER NOT NULL, user_id INTEGER DEFAULT NULL, random_id VARCHAR(255) NOT NULL COLLATE BINARY, redirect_uris CLOB NOT NULL COLLATE BINARY, secret VARCHAR(255) NOT NULL COLLATE BINARY, allowed_grant_types CLOB NOT NULL COLLATE BINARY, name CLOB DEFAULT NULL COLLATE BINARY, PRIMARY KEY(id), CONSTRAINT IDX_user_oauth_client FOREIGN KEY (user_id) REFERENCES wallabag_user (id) ON DELETE CASCADE NOT DEFERRABLE INITIALLY IMMEDIATE) | ||
152 | INSERT INTO wallabag_oauth2_clients (id, random_id, redirect_uris, secret, allowed_grant_types, name) SELECT id, random_id, redirect_uris, secret, allowed_grant_types, name FROM __temp__wallabag_oauth2_clients | ||
153 | DROP TABLE __temp__wallabag_oauth2_clients | ||
154 | CREATE INDEX IDX_635D765EA76ED395 ON wallabag_oauth2_clients (user_id) | ||
155 | |||
156 | Migration down | ||
157 | """""""""""""" | ||
158 | |||
159 | .. code-block:: sql | ||
160 | |||
161 | DROP INDEX IDX_635D765EA76ED395 | ||
162 | CREATE TEMPORARY TABLE __temp__wallabag_oauth2_clients AS SELECT id, random_id, redirect_uris, secret, allowed_grant_types, name FROM wallabag_oauth2_clients | ||
163 | DROP TABLE wallabag_oauth2_clients | ||
164 | CREATE TABLE wallabag_oauth2_clients (id INTEGER NOT NULL, random_id VARCHAR(255) NOT NULL COLLATE BINARY, redirect_uris CLOB NOT NULL COLLATE BINARY, secret VARCHAR(255) NOT NULL COLLATE BINARY, allowed_grant_types CLOB NOT NULL COLLATE BINARY, name CLOB DEFAULT NULL COLLATE BINARY, PRIMARY KEY(id)) | ||
165 | INSERT INTO wallabag_oauth2_clients (id, random_id, redirect_uris, secret, allowed_grant_types, name) SELECT id, random_id, redirect_uris, secret, allowed_grant_types, name FROM __temp__wallabag_oauth2_clients | ||
166 | DROP TABLE __temp__wallabag_oauth2_clients | ||
167 | |||
168 | Migration 20161031132655 | ||
169 | ------------------------ | ||
170 | |||
171 | MySQL | ||
172 | ^^^^^ | ||
173 | |||
174 | Migration up | ||
175 | """""""""""" | ||
176 | |||
177 | .. code-block:: sql | ||
178 | |||
179 | INSERT INTO wallabag_craue_config_setting (name, value, section) VALUES ('download_images_enabled', 0, 'misc') | ||
180 | |||
181 | Migration down | ||
182 | """""""""""""" | ||
183 | |||
184 | .. code-block:: sql | ||
185 | |||
186 | DELETE FROM wallabag_craue_config_setting WHERE name = 'download_images_enabled'; | ||
187 | |||
188 | PostgreSQL | ||
189 | ^^^^^^^^^^ | ||
190 | |||
191 | Migration up | ||
192 | """""""""""" | ||
193 | |||
194 | .. code-block:: sql | ||
195 | |||
196 | INSERT INTO wallabag_craue_config_setting (name, value, section) VALUES ('download_images_enabled', 0, 'misc') | ||
197 | |||
198 | Migration down | ||
199 | """""""""""""" | ||
200 | |||
201 | .. code-block:: sql | ||
202 | |||
203 | DELETE FROM wallabag_craue_config_setting WHERE name = 'download_images_enabled'; | ||
204 | |||
205 | SQLite | ||
206 | ^^^^^^ | ||
207 | |||
208 | Migration up | ||
209 | """""""""""" | ||
210 | |||
211 | .. code-block:: sql | ||
212 | |||
213 | INSERT INTO wallabag_craue_config_setting (name, value, section) VALUES ('download_images_enabled', 0, 'misc') | ||
214 | |||
215 | Migration down | ||
216 | """""""""""""" | ||
217 | |||
218 | .. code-block:: sql | ||
219 | |||
220 | DELETE FROM wallabag_craue_config_setting WHERE name = 'download_images_enabled'; | ||
221 | |||
222 | Migration 20161104073720 | ||
223 | ------------------------ | ||
224 | |||
225 | MySQL | ||
226 | ^^^^^ | ||
227 | |||
228 | Migration up | ||
229 | """""""""""" | ||
230 | |||
231 | .. code-block:: sql | ||
232 | |||
233 | CREATE INDEX IDX_entry_created_at ON wallabag_entry (created_at) | ||
234 | |||
235 | Migration down | ||
236 | """""""""""""" | ||
237 | |||
238 | .. code-block:: sql | ||
239 | |||
240 | DROP INDEX IDX_entry_created_at ON wallabag_entry | ||
241 | |||
242 | PostgreSQL | ||
243 | ^^^^^^^^^^ | ||
244 | |||
245 | Migration up | ||
246 | """""""""""" | ||
247 | |||
248 | .. code-block:: sql | ||
249 | |||
250 | CREATE INDEX IDX_entry_created_at ON wallabag_entry (created_at) | ||
251 | |||
252 | Migration down | ||
253 | """""""""""""" | ||
254 | |||
255 | .. code-block:: sql | ||
256 | |||
257 | DROP INDEX idx_entry_created_at | ||
258 | |||
259 | SQLite | ||
260 | ^^^^^^ | ||
261 | |||
262 | Migration up | ||
263 | """""""""""" | ||
264 | |||
265 | .. code-block:: sql | ||
266 | |||
267 | DROP INDEX created_at_idx | ||
268 | DROP INDEX IDX_F4D18282A76ED395 | ||
269 | CREATE TEMPORARY TABLE __temp__wallabag_entry AS SELECT id, user_id, uuid, title, url, is_archived, is_starred, content, created_at, updated_at, mimetype, language, reading_time, domain_name, preview_picture, is_public FROM wallabag_entry | ||
270 | DROP TABLE wallabag_entry | ||
271 | CREATE TABLE wallabag_entry (id INTEGER NOT NULL, user_id INTEGER DEFAULT NULL, uuid CLOB DEFAULT NULL COLLATE BINARY, 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, reading_time INTEGER DEFAULT NULL, domain_name CLOB DEFAULT NULL COLLATE BINARY, preview_picture CLOB DEFAULT NULL COLLATE BINARY, is_public BOOLEAN DEFAULT '0', PRIMARY KEY(id)) | ||
272 | INSERT INTO wallabag_entry (id, user_id, uuid, title, url, is_archived, is_starred, content, created_at, updated_at, mimetype, language, reading_time, domain_name, preview_picture, is_public) SELECT id, user_id, uuid, title, url, is_archived, is_starred, content, created_at, updated_at, mimetype, language, reading_time, domain_name, preview_picture, is_public FROM __temp__wallabag_entry | ||
273 | DROP TABLE __temp__wallabag_entry | ||
274 | CREATE INDEX created_at_idx ON wallabag_entry (created_at) | ||
275 | CREATE INDEX IDX_F4D18282A76ED395 ON wallabag_entry (user_id) | ||
276 | CREATE INDEX IDX_entry_created_at ON wallabag_entry (created_at) | ||
277 | |||
278 | Migration down | ||
279 | """""""""""""" | ||
280 | |||
281 | .. code-block:: sql | ||
282 | |||
283 | DROP INDEX IDX_entry_created_at | ||
284 | DROP INDEX IDX_F4D18282A76ED395 | ||
285 | DROP INDEX created_at_idx | ||
286 | CREATE TEMPORARY TABLE __temp__wallabag_entry AS SELECT id, user_id, uuid, title, url, is_archived, is_starred, content, created_at, updated_at, mimetype, language, reading_time, domain_name, preview_picture, is_public FROM wallabag_entry | ||
287 | DROP TABLE wallabag_entry | ||
288 | CREATE TABLE wallabag_entry (id INTEGER NOT NULL, user_id INTEGER DEFAULT NULL, uuid CLOB DEFAULT NULL COLLATE BINARY, 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, reading_time INTEGER DEFAULT NULL, domain_name CLOB DEFAULT NULL COLLATE BINARY, preview_picture CLOB DEFAULT NULL COLLATE BINARY, is_public BOOLEAN DEFAULT '0', PRIMARY KEY(id)) | ||
289 | INSERT INTO wallabag_entry (id, user_id, uuid, title, url, is_archived, is_starred, content, created_at, updated_at, mimetype, language, reading_time, domain_name, preview_picture, is_public) SELECT id, user_id, uuid, title, url, is_archived, is_starred, content, created_at, updated_at, mimetype, language, reading_time, domain_name, preview_picture, is_public FROM __temp__wallabag_entry | ||
290 | DROP TABLE __temp__wallabag_entry | ||
291 | CREATE INDEX IDX_F4D18282A76ED395 ON wallabag_entry (user_id) | ||
292 | CREATE INDEX created_at_idx ON wallabag_entry (created_at) | ||
293 | |||
294 | Migration 20161106113822 | ||
295 | ------------------------ | ||
296 | |||
297 | MySQL | ||
298 | ^^^^^ | ||
299 | |||
300 | Migration up | ||
301 | """""""""""" | ||
302 | |||
303 | .. code-block:: sql | ||
304 | |||
305 | ALTER TABLE wallabag_config ADD action_mark_as_read INT DEFAULT 0 | ||
306 | |||
307 | Migration down | ||
308 | """""""""""""" | ||
309 | |||
310 | .. code-block:: sql | ||
311 | |||
312 | ALTER TABLE wallabag_config DROP action_mark_as_read | ||
313 | |||
314 | PostgreSQL | ||
315 | ^^^^^^^^^^ | ||
316 | |||
317 | Migration up | ||
318 | """""""""""" | ||
319 | |||
320 | .. code-block:: sql | ||
321 | |||
322 | ALTER TABLE wallabag_config ADD action_mark_as_read INT DEFAULT 0 | ||
323 | |||
324 | Migration down | ||
325 | """""""""""""" | ||
326 | |||
327 | .. code-block:: sql | ||
328 | |||
329 | ALTER TABLE wallabag_config DROP action_mark_as_read | ||
330 | |||
331 | SQLite | ||
332 | ^^^^^^ | ||
333 | |||
334 | Migration up | ||
335 | """""""""""" | ||
336 | |||
337 | .. code-block:: sql | ||
338 | |||
339 | ALTER TABLE wallabag_config ADD COLUMN action_mark_as_read INTEGER DEFAULT 0 | ||
340 | |||
341 | Migration down | ||
342 | """""""""""""" | ||
343 | |||
344 | .. code-block:: sql | ||
345 | |||
346 | DROP INDEX UNIQ_87E64C53A76ED395 | ||
347 | CREATE TEMPORARY TABLE __temp__wallabag_config AS SELECT id, user_id, theme, items_per_page, language, rss_token, rss_limit, reading_speed, pocket_consumer_key FROM wallabag_config | ||
348 | DROP TABLE wallabag_config | ||
349 | CREATE TABLE wallabag_config (id INTEGER 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, rss_token VARCHAR(255) DEFAULT NULL COLLATE BINARY, rss_limit INTEGER DEFAULT NULL, reading_speed DOUBLE PRECISION DEFAULT NULL, pocket_consumer_key VARCHAR(255) DEFAULT NULL COLLATE BINARY, PRIMARY KEY(id)) | ||
350 | INSERT INTO wallabag_config (id, user_id, theme, items_per_page, language, rss_token, rss_limit, reading_speed, pocket_consumer_key) SELECT id, user_id, theme, items_per_page, language, rss_token, rss_limit, reading_speed, pocket_consumer_key FROM __temp__wallabag_config | ||
351 | DROP TABLE __temp__wallabag_config | ||
352 | CREATE UNIQUE INDEX UNIQ_87E64C53A76ED395 ON wallabag_config (user_id) | ||
353 | |||
354 | Migration 20161117071626 | ||
355 | ------------------------ | ||
356 | |||
357 | MySQL | ||
358 | ^^^^^ | ||
359 | |||
360 | Migration up | ||
361 | """""""""""" | ||
362 | |||
363 | .. code-block:: sql | ||
364 | |||
365 | INSERT INTO wallabag_craue_config_setting (name, value, section) VALUES ('share_unmark', 0, 'entry') | ||
366 | INSERT INTO wallabag_craue_config_setting (name, value, section) VALUES ('unmark_url', 'https://unmark.it', 'entry') | ||
367 | |||
368 | Migration down | ||
369 | """""""""""""" | ||
370 | |||
371 | .. code-block:: sql | ||
372 | |||
373 | DELETE FROM wallabag_craue_config_setting WHERE name = 'share_unmark'; | ||
374 | DELETE FROM wallabag_craue_config_setting WHERE name = 'unmark_url'; | ||
375 | |||
376 | PostgreSQL | ||
377 | ^^^^^^^^^^ | ||
378 | |||
379 | Migration up | ||
380 | """""""""""" | ||
381 | |||
382 | .. code-block:: sql | ||
383 | |||
384 | INSERT INTO wallabag_craue_config_setting (name, value, section) VALUES ('share_unmark', 0, 'entry') | ||
385 | INSERT INTO wallabag_craue_config_setting (name, value, section) VALUES ('unmark_url', 'https://unmark.it', 'entry') | ||
386 | |||
387 | Migration down | ||
388 | """""""""""""" | ||
389 | |||
390 | .. code-block:: sql | ||
391 | |||
392 | DELETE FROM wallabag_craue_config_setting WHERE name = 'share_unmark'; | ||
393 | DELETE FROM wallabag_craue_config_setting WHERE name = 'unmark_url'; | ||
394 | |||
395 | SQLite | ||
396 | ^^^^^^ | ||
397 | |||
398 | Migration up | ||
399 | """""""""""" | ||
400 | |||
401 | .. code-block:: sql | ||
402 | |||
403 | INSERT INTO wallabag_craue_config_setting (name, value, section) VALUES ('share_unmark', 0, 'entry') | ||
404 | INSERT INTO wallabag_craue_config_setting (name, value, section) VALUES ('unmark_url', 'https://unmark.it', 'entry') | ||
405 | |||
406 | Migration down | ||
407 | """""""""""""" | ||
408 | |||
409 | .. code-block:: sql | ||
410 | |||
411 | DELETE FROM wallabag_craue_config_setting WHERE name = 'share_unmark'; | ||
412 | DELETE FROM wallabag_craue_config_setting WHERE name = 'unmark_url'; | ||
413 | |||
414 | Migration 20161118134328 | ||
415 | ------------------------ | ||
416 | |||
417 | MySQL | ||
418 | ^^^^^ | ||
419 | |||
420 | Migration up | ||
421 | """""""""""" | ||
422 | |||
423 | .. code-block:: sql | ||
424 | |||
425 | ALTER TABLE wallabag_entry ADD http_status VARCHAR(3) DEFAULT NULL | ||
426 | |||
427 | Migration down | ||
428 | """""""""""""" | ||
429 | |||
430 | .. code-block:: sql | ||
431 | |||
432 | ALTER TABLE wallabag_entry DROP http_status | ||
433 | |||
434 | PostgreSQL | ||
435 | ^^^^^^^^^^ | ||
436 | |||
437 | Migration up | ||
438 | """""""""""" | ||
439 | |||
440 | .. code-block:: sql | ||
441 | |||
442 | ALTER TABLE wallabag_entry ADD http_status VARCHAR(3) DEFAULT NULL | ||
443 | |||
444 | Migration down | ||
445 | """""""""""""" | ||
446 | |||
447 | .. code-block:: sql | ||
448 | |||
449 | ALTER TABLE wallabag_entry DROP http_status | ||
450 | |||
451 | SQLite | ||
452 | ^^^^^^ | ||
453 | |||
454 | Migration up | ||
455 | """""""""""" | ||
456 | |||
457 | .. code-block:: sql | ||
458 | |||
459 | ALTER TABLE wallabag_entry ADD COLUMN http_status VARCHAR(3) DEFAULT NULL | ||
460 | |||
461 | Migration down | ||
462 | """""""""""""" | ||
463 | |||
464 | .. code-block:: sql | ||
465 | |||
466 | DROP INDEX created_at_idx | ||
467 | DROP INDEX IDX_F4D18282A76ED395 | ||
468 | CREATE TEMPORARY TABLE __temp__wallabag_entry AS SELECT id, user_id, uuid, title, url, is_archived, is_starred, content, created_at, updated_at, mimetype, language, reading_time, domain_name, preview_picture, is_public FROM wallabag_entry | ||
469 | DROP TABLE wallabag_entry | ||
470 | CREATE TABLE wallabag_entry (id INTEGER NOT NULL, user_id INTEGER DEFAULT NULL, uuid CLOB DEFAULT NULL COLLATE BINARY, 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, reading_time INTEGER DEFAULT NULL, domain_name CLOB DEFAULT NULL COLLATE BINARY, preview_picture CLOB DEFAULT NULL COLLATE BINARY, is_public BOOLEAN DEFAULT '0', PRIMARY KEY(id)) | ||
471 | INSERT INTO wallabag_entry (id, user_id, uuid, title, url, is_archived, is_starred, content, created_at, updated_at, mimetype, language, reading_time, domain_name, preview_picture, is_public) SELECT id, user_id, uuid, title, url, is_archived, is_starred, content, created_at, updated_at, mimetype, language, reading_time, domain_name, preview_picture, is_public FROM __temp__wallabag_entry | ||
472 | DROP TABLE __temp__wallabag_entry | ||
473 | CREATE INDEX created_at_idx ON wallabag_entry (created_at) | ||
474 | CREATE INDEX IDX_F4D18282A76ED395 ON wallabag_entry (user_id) | ||
475 | |||
476 | Migration 20161122144743 | ||
477 | ------------------------ | ||
478 | |||
479 | MySQL | ||
480 | ^^^^^ | ||
481 | |||
482 | Migration up | ||
483 | """""""""""" | ||
484 | |||
485 | .. code-block:: sql | ||
486 | |||
487 | INSERT INTO wallabag_craue_config_setting (name, value, section) VALUES ('restricted_access', 0, 'entry') | ||
488 | |||
489 | Migration down | ||
490 | """""""""""""" | ||
491 | |||
492 | .. code-block:: sql | ||
493 | |||
494 | DELETE FROM wallabag_craue_config_setting WHERE name = 'restricted_access'; | ||
495 | |||
496 | PostgreSQL | ||
497 | ^^^^^^^^^^ | ||
498 | |||
499 | Migration up | ||
500 | """""""""""" | ||
501 | |||
502 | .. code-block:: sql | ||
503 | |||
504 | INSERT INTO wallabag_craue_config_setting (name, value, section) VALUES ('restricted_access', 0, 'entry') | ||
505 | |||
506 | Migration down | ||
507 | """""""""""""" | ||
508 | |||
509 | .. code-block:: sql | ||
510 | |||
511 | DELETE FROM wallabag_craue_config_setting WHERE name = 'restricted_access'; | ||
512 | |||
513 | SQLite | ||
514 | ^^^^^^ | ||
515 | |||
516 | Migration up | ||
517 | """""""""""" | ||
518 | |||
519 | .. code-block:: sql | ||
520 | |||
521 | INSERT INTO wallabag_craue_config_setting (name, value, section) VALUES ('restricted_access', 0, 'entry') | ||
522 | |||
523 | Migration down | ||
524 | """""""""""""" | ||
525 | |||
526 | .. code-block:: sql | ||
527 | |||
528 | DELETE FROM wallabag_craue_config_setting WHERE name = 'restricted_access'; | ||
529 | |||
530 | Migration 20161122203647 | ||
531 | ------------------------ | ||
532 | |||
533 | MySQL | ||
534 | ^^^^^ | ||
535 | |||
536 | Migration up | ||
537 | """""""""""" | ||
538 | |||
539 | .. code-block:: sql | ||
540 | |||
541 | ALTER TABLE wallabag_user DROP expired, DROP credentials_expired | ||
542 | |||
543 | Migration down | ||
544 | """""""""""""" | ||
545 | |||
546 | .. code-block:: sql | ||
547 | |||
548 | ALTER TABLE wallabag_user ADD expired SMALLINT DEFAULT NULL, ADD credentials_expired SMALLINT DEFAULT NULL | ||
549 | |||
550 | PostgreSQL | ||
551 | ^^^^^^^^^^ | ||
552 | |||
553 | Migration up | ||
554 | """""""""""" | ||
555 | |||
556 | .. code-block:: sql | ||
557 | |||
558 | ALTER TABLE wallabag_user DROP expired | ||
559 | ALTER TABLE wallabag_user DROP credentials_expired | ||
560 | |||
561 | Migration down | ||
562 | """""""""""""" | ||
563 | |||
564 | .. code-block:: sql | ||
565 | |||
566 | ALTER TABLE wallabag_user ADD expired SMALLINT DEFAULT NULL | ||
567 | ALTER TABLE wallabag_user ADD credentials_expired SMALLINT DEFAULT NULL | ||
568 | |||
569 | SQLite | ||
570 | ^^^^^^ | ||
571 | |||
572 | Migration up | ||
573 | """""""""""" | ||
574 | |||
575 | .. code-block:: sql | ||
576 | |||
577 | DROP INDEX UNIQ_1D63E7E5C05FB297 | ||
578 | DROP INDEX UNIQ_1D63E7E5A0D96FBF | ||
579 | DROP INDEX UNIQ_1D63E7E592FC23A8 | ||
580 | CREATE TEMPORARY TABLE __temp__wallabag_user AS SELECT id, username, username_canonical, email, email_canonical, enabled, salt, password, last_login, locked, expires_at, confirmation_token, password_requested_at, roles, credentials_expire_at, name, created_at, updated_at, authCode, twoFactorAuthentication, trusted FROM wallabag_user | ||
581 | DROP TABLE wallabag_user | ||
582 | CREATE TABLE wallabag_user (id INTEGER 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, salt VARCHAR(255) NOT NULL COLLATE BINARY, password VARCHAR(255) NOT NULL COLLATE BINARY, last_login DATETIME DEFAULT NULL, locked BOOLEAN NOT NULL, expires_at DATETIME DEFAULT NULL, confirmation_token VARCHAR(180) DEFAULT NULL COLLATE BINARY, password_requested_at DATETIME DEFAULT NULL, roles CLOB NOT NULL COLLATE BINARY, credentials_expire_at DATETIME DEFAULT NULL, name CLOB DEFAULT NULL COLLATE BINARY, created_at DATETIME NOT NULL, updated_at DATETIME NOT NULL, authCode INTEGER DEFAULT NULL, twoFactorAuthentication BOOLEAN NOT NULL, trusted CLOB DEFAULT NULL COLLATE BINARY, PRIMARY KEY(id)) | ||
583 | INSERT INTO wallabag_user (id, username, username_canonical, email, email_canonical, enabled, salt, password, last_login, locked, expires_at, confirmation_token, password_requested_at, roles, credentials_expire_at, name, created_at, updated_at, authCode, twoFactorAuthentication, trusted) SELECT id, username, username_canonical, email, email_canonical, enabled, salt, password, last_login, locked, expires_at, confirmation_token, password_requested_at, roles, credentials_expire_at, name, created_at, updated_at, authCode, twoFactorAuthentication, trusted FROM __temp__wallabag_user | ||
584 | DROP TABLE __temp__wallabag_user | ||
585 | CREATE UNIQUE INDEX UNIQ_1D63E7E5C05FB297 ON wallabag_user (confirmation_token) | ||
586 | CREATE UNIQUE INDEX UNIQ_1D63E7E5A0D96FBF ON wallabag_user (email_canonical) | ||
587 | CREATE UNIQUE INDEX UNIQ_1D63E7E592FC23A8 ON wallabag_user (username_canonical) | ||
588 | |||
589 | Migration down | ||
590 | """""""""""""" | ||
591 | |||
592 | .. code-block:: sql | ||
593 | |||
594 | ALTER TABLE wallabag_user ADD COLUMN expired SMALLINT DEFAULT NULL | ||
595 | ALTER TABLE wallabag_user ADD COLUMN credentials_expired SMALLINT DEFAULT NULL | ||
596 | |||
597 | Migration 20161128084725 | ||
598 | ------------------------ | ||
599 | |||
600 | MySQL | ||
601 | ^^^^^ | ||
602 | |||
603 | Migration up | ||
604 | """""""""""" | ||
605 | |||
606 | .. code-block:: sql | ||
607 | |||
608 | ALTER TABLE wallabag_config ADD list_mode INT DEFAULT NULL | ||
609 | |||
610 | Migration down | ||
611 | """""""""""""" | ||
612 | |||
613 | .. code-block:: sql | ||
614 | |||
615 | ALTER TABLE wallabag_config DROP list_mode | ||
616 | |||
617 | PostgreSQL | ||
618 | ^^^^^^^^^^ | ||
619 | |||
620 | Migration up | ||
621 | """""""""""" | ||
622 | |||
623 | .. code-block:: sql | ||
624 | |||
625 | ALTER TABLE wallabag_config ADD list_mode INT DEFAULT NULL | ||
626 | |||
627 | Migration down | ||
628 | """""""""""""" | ||
629 | |||
630 | .. code-block:: sql | ||
631 | |||
632 | ALTER TABLE wallabag_config DROP list_mode | ||
633 | |||
634 | SQLite | ||
635 | ^^^^^^ | ||
636 | |||
637 | Migration up | ||
638 | """""""""""" | ||
639 | |||
640 | .. code-block:: sql | ||
641 | |||
642 | ALTER TABLE wallabag_config ADD COLUMN list_mode INTEGER DEFAULT NULL | ||
643 | |||
644 | Migration down | ||
645 | """""""""""""" | ||
646 | |||
647 | .. code-block:: sql | ||
648 | |||
649 | DROP INDEX UNIQ_87E64C53A76ED395 | ||
650 | CREATE TEMPORARY TABLE __temp__wallabag_config AS SELECT id, user_id, theme, items_per_page, language, rss_token, rss_limit, reading_speed, pocket_consumer_key FROM wallabag_config | ||
651 | DROP TABLE wallabag_config | ||
652 | CREATE TABLE wallabag_config (id INTEGER 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, rss_token VARCHAR(255) DEFAULT NULL COLLATE BINARY, rss_limit INTEGER DEFAULT NULL, reading_speed DOUBLE PRECISION DEFAULT NULL, pocket_consumer_key VARCHAR(255) DEFAULT NULL COLLATE BINARY, PRIMARY KEY(id)) | ||
653 | INSERT INTO wallabag_config (id, user_id, theme, items_per_page, language, rss_token, rss_limit, reading_speed, pocket_consumer_key) SELECT id, user_id, theme, items_per_page, language, rss_token, rss_limit, reading_speed, pocket_consumer_key FROM __temp__wallabag_config | ||
654 | DROP TABLE __temp__wallabag_config | ||
655 | CREATE UNIQUE INDEX UNIQ_87E64C53A76ED395 ON wallabag_config (user_id) | ||
656 | |||
657 | Migration 20161128131503 | ||
658 | ------------------------ | ||
659 | |||
660 | MySQL | ||
661 | ^^^^^ | ||
662 | |||
663 | Migration up | ||
664 | """""""""""" | ||
665 | |||
666 | .. code-block:: sql | ||
667 | |||
668 | ALTER TABLE wallabag_user DROP locked, DROP credentials_expire_at, DROP expires_at | ||
669 | |||
670 | Migration down | ||
671 | """""""""""""" | ||
672 | |||
673 | .. code-block:: sql | ||
674 | |||
675 | ALTER TABLE wallabag_user ADD locked SMALLINT DEFAULT NULL, ADD credentials_expire_at DATETIME DEFAULT NULL, ADD expires_at DATETIME DEFAULT NULL | ||
676 | |||
677 | PostgreSQL | ||
678 | ^^^^^^^^^^ | ||
679 | |||
680 | Migration up | ||
681 | """""""""""" | ||
682 | |||
683 | .. code-block:: sql | ||
684 | |||
685 | ALTER TABLE wallabag_user DROP locked | ||
686 | ALTER TABLE wallabag_user DROP credentials_expire_at | ||
687 | ALTER TABLE wallabag_user DROP expires_at | ||
688 | |||
689 | Migration down | ||
690 | """""""""""""" | ||
691 | |||
692 | .. code-block:: sql | ||
693 | |||
694 | ALTER TABLE wallabag_user ADD locked SMALLINT DEFAULT NULL | ||
695 | ALTER TABLE wallabag_user ADD credentials_expire_at TIMESTAMP(0) WITHOUT TIME ZONE DEFAULT NULL | ||
696 | ALTER TABLE wallabag_user ADD expires_at TIMESTAMP(0) WITHOUT TIME ZONE DEFAULT NULL | ||
697 | |||
698 | SQLite | ||
699 | ^^^^^^ | ||
700 | |||
701 | Migration up | ||
702 | """""""""""" | ||
703 | |||
704 | .. code-block:: sql | ||
705 | |||
706 | ALTER TABLE wallabag_user ADD COLUMN locked SMALLINT DEFAULT NULL | ||
707 | ALTER TABLE wallabag_user ADD COLUMN credentials_expire_at DATETIME DEFAULT NULL | ||
708 | ALTER TABLE wallabag_user ADD COLUMN expires_at DATETIME DEFAULT NULL | ||
709 | |||
710 | Migration down | ||
711 | """""""""""""" | ||
712 | |||
713 | .. code-block:: sql | ||
714 | |||
715 | DROP INDEX UNIQ_1D63E7E592FC23A8 | ||
716 | DROP INDEX UNIQ_1D63E7E5A0D96FBF | ||
717 | DROP INDEX UNIQ_1D63E7E5C05FB297 | ||
718 | CREATE TEMPORARY TABLE __temp__wallabag_user 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, trusted, expired, credentials_expired FROM wallabag_user | ||
719 | DROP TABLE wallabag_user | ||
720 | CREATE TABLE wallabag_user (id INTEGER 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, salt VARCHAR(255) NOT NULL COLLATE BINARY, password VARCHAR(255) NOT NULL COLLATE BINARY, last_login DATETIME DEFAULT NULL, confirmation_token VARCHAR(180) DEFAULT NULL COLLATE BINARY, password_requested_at DATETIME DEFAULT NULL, roles CLOB NOT NULL COLLATE BINARY, name CLOB DEFAULT NULL COLLATE BINARY, created_at DATETIME NOT NULL, updated_at DATETIME NOT NULL, authCode INTEGER DEFAULT NULL, twoFactorAuthentication BOOLEAN NOT NULL, trusted CLOB DEFAULT NULL COLLATE BINARY, expired SMALLINT DEFAULT NULL, credentials_expired SMALLINT DEFAULT NULL, PRIMARY KEY(id)) | ||
721 | INSERT INTO wallabag_user (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, trusted, expired, credentials_expired) 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, trusted, expired, credentials_expired FROM __temp__wallabag_user | ||
722 | DROP TABLE __temp__wallabag_user | ||
723 | CREATE UNIQUE INDEX UNIQ_1D63E7E592FC23A8 ON wallabag_user (username_canonical) | ||
724 | CREATE UNIQUE INDEX UNIQ_1D63E7E5A0D96FBF ON wallabag_user (email_canonical) | ||
725 | CREATE UNIQUE INDEX UNIQ_1D63E7E5C05FB297 ON wallabag_user (confirmation_token) | ||
726 | |||
727 | Migration 20161214094403 | ||
728 | ------------------------ | ||
729 | |||
730 | MySQL | ||
731 | ^^^^^ | ||
732 | |||
733 | Migration up | ||
734 | """""""""""" | ||
735 | |||
736 | .. code-block:: sql | ||
737 | |||
738 | CREATE INDEX IDX_entry_uid ON wallabag_entry (uid) | ||
739 | |||
740 | Migration down | ||
741 | """""""""""""" | ||
742 | |||
743 | .. code-block:: sql | ||
744 | |||
745 | DROP INDEX IDX_entry_uid ON wallabag_entry | ||
746 | |||
747 | PostgreSQL | ||
748 | ^^^^^^^^^^ | ||
749 | |||
750 | Migration up | ||
751 | """""""""""" | ||
752 | |||
753 | .. code-block:: sql | ||
754 | |||
755 | CREATE INDEX IDX_entry_uid ON wallabag_entry (uid) | ||
756 | |||
757 | Migration down | ||
758 | """""""""""""" | ||
759 | |||
760 | .. code-block:: sql | ||
761 | |||
762 | DROP INDEX idx_entry_uid | ||
763 | |||
764 | SQLite | ||
765 | ^^^^^^ | ||
766 | |||
767 | Migration up | ||
768 | """""""""""" | ||
769 | |||
770 | .. code-block:: sql | ||
771 | |||
772 | DROP INDEX IDX_F4D18282A76ED395 | ||
773 | DROP INDEX created_at_idx | ||
774 | CREATE TEMPORARY TABLE __temp__wallabag_entry AS SELECT id, user_id, uid, title, url, is_archived, is_starred, content, created_at, updated_at, mimetype, language, reading_time, domain_name, preview_picture, is_public FROM wallabag_entry | ||
775 | DROP TABLE wallabag_entry | ||
776 | CREATE TABLE wallabag_entry (id INTEGER NOT NULL, user_id INTEGER DEFAULT NULL, uid CLOB DEFAULT NULL COLLATE BINARY, 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, reading_time INTEGER DEFAULT NULL, domain_name CLOB DEFAULT NULL COLLATE BINARY, preview_picture CLOB DEFAULT NULL COLLATE BINARY, is_public BOOLEAN DEFAULT '0', PRIMARY KEY(id)) | ||
777 | INSERT INTO wallabag_entry (id, user_id, uid, title, url, is_archived, is_starred, content, created_at, updated_at, mimetype, language, reading_time, domain_name, preview_picture, is_public) SELECT id, user_id, uid, title, url, is_archived, is_starred, content, created_at, updated_at, mimetype, language, reading_time, domain_name, preview_picture, is_public FROM __temp__wallabag_entry | ||
778 | DROP TABLE __temp__wallabag_entry | ||
779 | CREATE INDEX IDX_F4D18282A76ED395 ON wallabag_entry (user_id) | ||
780 | CREATE INDEX created_at_idx ON wallabag_entry (created_at) | ||
781 | CREATE INDEX IDX_entry_uid ON wallabag_entry (uid) | ||
782 | |||
783 | Migration down | ||
784 | """""""""""""" | ||
785 | |||
786 | .. code-block:: sql | ||
787 | |||
788 | DROP INDEX IDX_entry_uid | ||
789 | DROP INDEX created_at_idx | ||
790 | DROP INDEX IDX_F4D18282A76ED395 | ||
791 | CREATE TEMPORARY TABLE __temp__wallabag_entry AS SELECT id, user_id, uid, title, url, is_archived, is_starred, content, created_at, updated_at, mimetype, language, reading_time, domain_name, preview_picture, is_public FROM wallabag_entry | ||
792 | DROP TABLE wallabag_entry | ||
793 | CREATE TABLE wallabag_entry (id INTEGER NOT NULL, user_id INTEGER DEFAULT NULL, uid CLOB DEFAULT NULL COLLATE BINARY, 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, reading_time INTEGER DEFAULT NULL, domain_name CLOB DEFAULT NULL COLLATE BINARY, preview_picture CLOB DEFAULT NULL COLLATE BINARY, is_public BOOLEAN DEFAULT '0', PRIMARY KEY(id)) | ||
794 | INSERT INTO wallabag_entry (id, user_id, uid, title, url, is_archived, is_starred, content, created_at, updated_at, mimetype, language, reading_time, domain_name, preview_picture, is_public) SELECT id, user_id, uid, title, url, is_archived, is_starred, content, created_at, updated_at, mimetype, language, reading_time, domain_name, preview_picture, is_public FROM __temp__wallabag_entry | ||
795 | DROP TABLE __temp__wallabag_entry | ||
796 | CREATE INDEX created_at_idx ON wallabag_entry (created_at) | ||
797 | CREATE INDEX IDX_F4D18282A76ED395 ON wallabag_entry (user_id) | ||
diff --git a/docs/en/user/upgrade.rst b/docs/en/user/upgrade.rst index e6e4c165..99260e13 100644 --- a/docs/en/user/upgrade.rst +++ b/docs/en/user/upgrade.rst | |||
@@ -1,44 +1,62 @@ | |||
1 | ================================== | ||
1 | Upgrade your wallabag installation | 2 | Upgrade your wallabag installation |
2 | ================================== | 3 | ================================== |
3 | 4 | ||
4 | You will find here different ways to upgrade your wallabag: | 5 | You will find here different ways to upgrade your wallabag: |
5 | 6 | ||
7 | - `from 2.1.x to 2.2.x <#upgrading-from-2-1-x-to-2-2-x>`_ | ||
6 | - `from 2.0.x to 2.1.1 <#upgrade-from-2-0-x-to-2-1-1>`_ | 8 | - `from 2.0.x to 2.1.1 <#upgrade-from-2-0-x-to-2-1-1>`_ |
7 | - `from 2.1.x to 2.1.y <#upgrading-from-2-1-x-to-2-1-y>`_ | ||
8 | - `from 1.x to 2.x <#from-wallabag-1-x>`_ | 9 | - `from 1.x to 2.x <#from-wallabag-1-x>`_ |
9 | 10 | ||
10 | Upgrade from 2.0.x to 2.1.1 | 11 | ***************************** |
11 | --------------------------- | 12 | Upgrading from 2.1.x to 2.2.x |
12 | 13 | ***************************** | |
13 | .. warning:: | ||
14 | |||
15 | Before this migration, if you configured the Pocket import by adding your consumer key in Internal settings, please do a backup of it: you'll have to add it into the Config page after the upgrade. | ||
16 | 14 | ||
17 | Upgrade on a dedicated web server | 15 | Upgrade on a dedicated web server |
18 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | 16 | ================================= |
19 | 17 | ||
20 | :: | 18 | :: |
21 | 19 | ||
22 | rm -rf var/cache/* | 20 | make update |
23 | git fetch origin | 21 | |
24 | git fetch --tags | 22 | Explanations about database migrations |
25 | git checkout 2.1.1 --force | 23 | -------------------------------------- |
26 | SYMFONY_ENV=prod composer install --no-dev -o --prefer-dist | 24 | |
27 | php bin/console doctrine:migrations:migrate --env=prod | 25 | During the update, we execute database migrations. |
28 | php bin/console cache:clear --env=prod | 26 | |
27 | All the database migrations are stored in ``app/DoctrineMigrations``. You can execute each migration individually: | ||
28 | ``bin/console doctrine:migrations:execute 20161001072726 --env=prod``. | ||
29 | |||
30 | You can also cancel each migration individually: ``bin/console doctrine:migrations:execute 20161001072726 --down --env=prod``. | ||
31 | |||
32 | Here is the migrations list for 2.1.x to 2.2.0 release: | ||
33 | |||
34 | * ``20161001072726``: added foreign keys for account resetting | ||
35 | * ``20161022134138``: converted database to ``utf8mb4`` encoding (for MySQL only) | ||
36 | * ``20161024212538``: added ``user_id`` column on ``oauth2_clients`` to prevent users to delete API clients from other users | ||
37 | * ``20161031132655``: added the internal setting to enable/disable downloading pictures | ||
38 | * ``20161104073720``: added ``created_at`` index on ``entry`` table | ||
39 | * ``20161106113822``: added ``action_mark_as_read`` field on ``config`` table | ||
40 | * ``20161117071626``: added the internal setting to share articles to unmark.it | ||
41 | * ``20161118134328``: added ``http_status`` field on ``entry`` table | ||
42 | * ``20161122144743``: added the internal setting to enable/disable fetching articles with paywall | ||
43 | * ``20161122203647``: dropped ``expired`` and ``credentials_expired`` fields on ``user`` table | ||
44 | * ``20161128084725``: added ``list_mode`` field on ``config`` table | ||
45 | * ``20161128131503``: dropped ``locked``, ``credentials_expire_at`` and ``expires_at`` fields on ``user`` table | ||
46 | * ``20161214094403``: added ``uid`` index on ``entry`` table | ||
29 | 47 | ||
30 | Upgrade on a shared hosting | 48 | Upgrade on a shared hosting |
31 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ | 49 | =========================== |
32 | 50 | ||
33 | Backup your ``app/config/parameters.yml`` file. | 51 | Backup your ``app/config/parameters.yml`` file. |
34 | 52 | ||
35 | Download the 2.1.1 release of wallabag: | 53 | Download the last release of wallabag: |
36 | 54 | ||
37 | .. code-block:: bash | 55 | .. code-block:: bash |
38 | 56 | ||
39 | wget https://framabag.org/wallabag-release-2.1.1.tar.gz && tar xvf wallabag-release-2.1.1.tar.gz | 57 | wget http://wllbg.org/latest-v2-package && tar xvf latest-v2-package |
40 | 58 | ||
41 | (md5 hash of the 2.1.1 package: ``9584a3b60a2b2a4de87f536548caac93``) | 59 | You will find the `md5 hash of the latest package on our website <https://www.wallabag.org/pages/download-wallabag.html>`_. |
42 | 60 | ||
43 | Extract the archive in your wallabag folder and replace ``app/config/parameters.yml`` with yours. | 61 | Extract the archive in your wallabag folder and replace ``app/config/parameters.yml`` with yours. |
44 | 62 | ||
@@ -48,42 +66,45 @@ If you use SQLite, you must also copy your ``data/`` folder inside the new insta | |||
48 | 66 | ||
49 | Empty ``var/cache`` folder. | 67 | Empty ``var/cache`` folder. |
50 | 68 | ||
51 | You must run some SQL queries to upgrade your database. We assume that the table prefix is ``wallabag_`` and the database server is a MySQL one: | 69 | You must run some SQL queries to upgrade your database. We assume that the table prefix is ``wallabag_``. Don't forgete to backup your database before migrating. |
52 | 70 | ||
53 | .. code-block:: sql | 71 | You may encounter issues with indexes names: if so, please change queries with the correct index name. |
54 | 72 | ||
55 | ALTER TABLE `wallabag_entry` ADD `uuid` LONGTEXT DEFAULT NULL; | 73 | `You can find all the queries here <http://doc.wallabag.org/en/master/user/query-upgrade-21-22.html>`_. |
56 | INSERT INTO `wallabag_craue_config_setting` (`name`, `value`, `section`) VALUES ('share_public', '1', 'entry'); | ||
57 | ALTER TABLE `wallabag_oauth2_clients` ADD name longtext COLLATE 'utf8_unicode_ci' DEFAULT NULL; | ||
58 | INSERT INTO `wallabag_craue_config_setting` (`name`, `value`, `section`) VALUES ('import_with_redis', '0', 'import'); | ||
59 | INSERT INTO `wallabag_craue_config_setting` (`name`, `value`, `section`) VALUES ('import_with_rabbitmq', '0', 'import'); | ||
60 | ALTER TABLE `wallabag_config` ADD `pocket_consumer_key` VARCHAR(255) DEFAULT NULL; | ||
61 | DELETE FROM `wallabag_craue_config_setting` WHERE `name` = 'pocket_consumer_key'; | ||
62 | 74 | ||
63 | Upgrading from 2.1.x to 2.1.y | 75 | *************************** |
64 | ----------------------------- | 76 | Upgrade from 2.0.x to 2.1.1 |
77 | *************************** | ||
65 | 78 | ||
66 | Upgrade on a dedicated web server | 79 | .. warning:: |
67 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | ||
68 | 80 | ||
69 | In order to upgrade your wallabag installation and get the last version, run the following command in you wallabag folder: | 81 | Before this migration, if you configured the Pocket import by adding your consumer key in Internal settings, please do a backup of it: you'll have to add it into the Config page after the upgrade. |
82 | |||
83 | Upgrade on a dedicated web server | ||
84 | ================================= | ||
70 | 85 | ||
71 | :: | 86 | :: |
72 | 87 | ||
73 | make update | 88 | rm -rf var/cache/* |
89 | git fetch origin | ||
90 | git fetch --tags | ||
91 | git checkout 2.1.1 --force | ||
92 | SYMFONY_ENV=prod composer install --no-dev -o --prefer-dist | ||
93 | php bin/console doctrine:migrations:migrate --env=prod | ||
94 | php bin/console cache:clear --env=prod | ||
74 | 95 | ||
75 | Upgrade on a shared hosting | 96 | Upgrade on a shared hosting |
76 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ | 97 | =========================== |
77 | 98 | ||
78 | Backup your ``app/config/parameters.yml`` file. | 99 | Backup your ``app/config/parameters.yml`` file. |
79 | 100 | ||
80 | Download the last release of wallabag: | 101 | Download the 2.1.1 release of wallabag: |
81 | 102 | ||
82 | .. code-block:: bash | 103 | .. code-block:: bash |
83 | 104 | ||
84 | wget https://wllbg.org/latest-v2-package && tar xvf latest-v2-package | 105 | wget http://framabag.org/wallabag-release-2.1.1.tar.gz && tar xvf wallabag-release-2.1.1.tar.gz |
85 | 106 | ||
86 | You will find the `md5 hash of the latest package on our website <https://www.wallabag.org/pages/download-wallabag.html>`_. | 107 | (md5 hash of the 2.1.1 package: ``9584a3b60a2b2a4de87f536548caac93``) |
87 | 108 | ||
88 | Extract the archive in your wallabag folder and replace ``app/config/parameters.yml`` with yours. | 109 | Extract the archive in your wallabag folder and replace ``app/config/parameters.yml`` with yours. |
89 | 110 | ||
@@ -93,8 +114,21 @@ If you use SQLite, you must also copy your ``data/`` folder inside the new insta | |||
93 | 114 | ||
94 | Empty ``var/cache`` folder. | 115 | Empty ``var/cache`` folder. |
95 | 116 | ||
117 | You must run some SQL queries to upgrade your database. We assume that the table prefix is ``wallabag_`` and the database server is a MySQL one: | ||
118 | |||
119 | .. code-block:: sql | ||
120 | |||
121 | ALTER TABLE `wallabag_entry` ADD `uuid` LONGTEXT DEFAULT NULL; | ||
122 | INSERT INTO `wallabag_craue_config_setting` (`name`, `value`, `section`) VALUES ('share_public', '1', 'entry'); | ||
123 | ALTER TABLE `wallabag_oauth2_clients` ADD name longtext COLLATE 'utf8_unicode_ci' DEFAULT NULL; | ||
124 | INSERT INTO `wallabag_craue_config_setting` (`name`, `value`, `section`) VALUES ('import_with_redis', '0', 'import'); | ||
125 | INSERT INTO `wallabag_craue_config_setting` (`name`, `value`, `section`) VALUES ('import_with_rabbitmq', '0', 'import'); | ||
126 | ALTER TABLE `wallabag_config` ADD `pocket_consumer_key` VARCHAR(255) DEFAULT NULL; | ||
127 | DELETE FROM `wallabag_craue_config_setting` WHERE `name` = 'pocket_consumer_key'; | ||
128 | |||
129 | ***************** | ||
96 | From wallabag 1.x | 130 | From wallabag 1.x |
97 | ----------------- | 131 | ***************** |
98 | 132 | ||
99 | There is no automatic script to update from wallabag 1.x to wallabag 2.x. You need to: | 133 | There is no automatic script to update from wallabag 1.x to wallabag 2.x. You need to: |
100 | 134 | ||
diff --git a/docs/fr/user/query-upgrade-21-22.rst b/docs/fr/user/query-upgrade-21-22.rst new file mode 100644 index 00000000..cd201dc2 --- /dev/null +++ b/docs/fr/user/query-upgrade-21-22.rst | |||
@@ -0,0 +1,797 @@ | |||
1 | Migration 20161001072726 | ||
2 | ------------------------ | ||
3 | |||
4 | MySQL | ||
5 | ^^^^^ | ||
6 | |||
7 | Migration up | ||
8 | """""""""""" | ||
9 | |||
10 | .. code-block:: sql | ||
11 | |||
12 | ALTER TABLE wallabag_entry_tag DROP FOREIGN KEY FK_C9F0DD7CBA364942 | ||
13 | ALTER TABLE wallabag_entry_tag DROP FOREIGN KEY FK_C9F0DD7CBAD26311 | ||
14 | ALTER TABLE wallabag_entry_tag ADD CONSTRAINT FK_entry_tag_entry FOREIGN KEY (entry_id) REFERENCES wallabag_entry (id) ON DELETE CASCADE | ||
15 | ALTER TABLE wallabag_entry_tag ADD CONSTRAINT FK_entry_tag_tag FOREIGN KEY (tag_id) REFERENCES wallabag_tag (id) ON DELETE CASCADE | ||
16 | ALTER TABLE wallabag_annotation DROP FOREIGN KEY FK_A7AED006BA364942 | ||
17 | ALTER TABLE wallabag_annotation ADD CONSTRAINT FK_annotation_entry FOREIGN KEY (entry_id) REFERENCES wallabag_entry (id) ON DELETE CASCADE | ||
18 | |||
19 | Migration down | ||
20 | """""""""""""" | ||
21 | |||
22 | We didn't write down migration for ``20161001072726``. | ||
23 | |||
24 | PostgreSQL | ||
25 | ^^^^^^^^^^ | ||
26 | |||
27 | Migration up | ||
28 | """""""""""" | ||
29 | |||
30 | .. code-block:: sql | ||
31 | |||
32 | ALTER TABLE wallabag_entry_tag DROP CONSTRAINT fk_c9f0dd7cba364942 | ||
33 | ALTER TABLE wallabag_entry_tag DROP CONSTRAINT fk_c9f0dd7cbad26311 | ||
34 | ALTER TABLE wallabag_entry_tag ADD CONSTRAINT FK_entry_tag_entry FOREIGN KEY (entry_id) REFERENCES wallabag_entry (id) ON DELETE CASCADE | ||
35 | ALTER TABLE wallabag_entry_tag ADD CONSTRAINT FK_entry_tag_tag FOREIGN KEY (tag_id) REFERENCES wallabag_tag (id) ON DELETE CASCADE | ||
36 | ALTER TABLE wallabag_annotation DROP CONSTRAINT fk_a7aed006ba364942 | ||
37 | ALTER TABLE wallabag_annotation ADD CONSTRAINT FK_annotation_entry FOREIGN KEY (entry_id) REFERENCES wallabag_entry (id) ON DELETE CASCADE | ||
38 | |||
39 | Migration down | ||
40 | """""""""""""" | ||
41 | |||
42 | We didn't write down migration for ``20161001072726``. | ||
43 | |||
44 | SQLite | ||
45 | ^^^^^^ | ||
46 | |||
47 | This migration can only be executed safely on MySQL or PostgreSQL. | ||
48 | |||
49 | Migration 20161022134138 | ||
50 | ------------------------ | ||
51 | |||
52 | MySQL | ||
53 | ^^^^^ | ||
54 | |||
55 | Migration up | ||
56 | """""""""""" | ||
57 | |||
58 | .. code-block:: sql | ||
59 | |||
60 | ALTER DATABASE wallabag CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci; | ||
61 | ALTER TABLE wallabag_user CHANGE confirmation_token confirmation_token VARCHAR(180) DEFAULT NULL; | ||
62 | ALTER TABLE wallabag_user CHANGE salt salt VARCHAR(180) NOT NULL; | ||
63 | ALTER TABLE wallabag_user CHANGE password password VARCHAR(180) NOT NULL; | ||
64 | ALTER TABLE wallabag_annotation CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci; | ||
65 | ALTER TABLE wallabag_entry CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci; | ||
66 | ALTER TABLE wallabag_tag CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci; | ||
67 | ALTER TABLE wallabag_user CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci; | ||
68 | ALTER TABLE wallabag_annotation CHANGE `text` `text` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci; | ||
69 | ALTER TABLE wallabag_annotation CHANGE `quote` `quote` VARCHAR(191) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci; | ||
70 | ALTER TABLE wallabag_entry CHANGE `title` `title` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci; | ||
71 | ALTER TABLE wallabag_entry CHANGE `content` `content` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci; | ||
72 | ALTER TABLE wallabag_tag CHANGE `label` `label` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci; | ||
73 | ALTER TABLE wallabag_user CHANGE `name` `name` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci; | ||
74 | |||
75 | Migration down | ||
76 | """""""""""""" | ||
77 | |||
78 | .. code-block:: sql | ||
79 | |||
80 | ALTER DATABASE wallabag CHARACTER SET = utf8 COLLATE = utf8_unicode_ci; | ||
81 | ALTER TABLE wallabag_annotation CONVERT TO CHARACTER SET utf8 COLLATE utf8_unicode_ci; | ||
82 | ALTER TABLE wallabag_entry CONVERT TO CHARACTER SET utf8 COLLATE utf8_unicode_ci; | ||
83 | ALTER TABLE wallabag_tag CONVERT TO CHARACTER SET utf8 COLLATE utf8_unicode_ci; | ||
84 | ALTER TABLE wallabag_user CONVERT TO CHARACTER SET utf8 COLLATE utf8_unicode_ci; | ||
85 | ALTER TABLE wallabag_annotation CHANGE `text` `text` longtext CHARACTER SET utf8 COLLATE utf8_unicode_ci; | ||
86 | ALTER TABLE wallabag_annotation CHANGE `quote` `quote` VARCHAR(255) CHARACTER SET utf8 COLLATE utf8_unicode_ci; | ||
87 | ALTER TABLE wallabag_entry CHANGE `title` `title` longtext CHARACTER SET utf8 COLLATE utf8_unicode_ci; | ||
88 | ALTER TABLE wallabag_entry CHANGE `content` `content` longtext CHARACTER SET utf8 COLLATE utf8_unicode_ci; | ||
89 | ALTER TABLE wallabag_tag CHANGE `label` `label` longtext CHARACTER SET utf8 COLLATE utf8_unicode_ci; | ||
90 | ALTER TABLE wallabag_user CHANGE `name` `name` longtext CHARACTER SET utf8 COLLATE utf8_unicode_ci; | ||
91 | |||
92 | PostgreSQL and SQLite | ||
93 | ^^^^^^^^^^^^^^^^^^^^^ | ||
94 | |||
95 | This migration only apply to MySQL. | ||
96 | |||
97 | Migration 20161024212538 | ||
98 | ------------------------ | ||
99 | |||
100 | MySQL | ||
101 | ^^^^^ | ||
102 | |||
103 | Migration up | ||
104 | """""""""""" | ||
105 | |||
106 | .. code-block:: sql | ||
107 | |||
108 | ALTER TABLE wallabag_oauth2_clients ADD user_id INT NOT NULL | ||
109 | ALTER TABLE wallabag_oauth2_clients ADD CONSTRAINT IDX_user_oauth_client FOREIGN KEY (user_id) REFERENCES wallabag_user (id) ON DELETE CASCADE | ||
110 | CREATE INDEX IDX_635D765EA76ED395 ON wallabag_oauth2_clients (user_id) | ||
111 | |||
112 | Migration down | ||
113 | """""""""""""" | ||
114 | |||
115 | .. code-block:: sql | ||
116 | |||
117 | ALTER TABLE wallabag_oauth2_clients DROP FOREIGN KEY IDX_user_oauth_client | ||
118 | ALTER TABLE wallabag_oauth2_clients DROP user_id | ||
119 | |||
120 | PostgreSQL | ||
121 | ^^^^^^^^^^ | ||
122 | |||
123 | Migration up | ||
124 | """""""""""" | ||
125 | |||
126 | .. code-block:: sql | ||
127 | |||
128 | ALTER TABLE wallabag_oauth2_clients ADD user_id INT DEFAULT NULL | ||
129 | ALTER TABLE wallabag_oauth2_clients ADD CONSTRAINT IDX_user_oauth_client FOREIGN KEY (user_id) REFERENCES wallabag_user (id) ON DELETE CASCADE NOT DEFERRABLE INITIALLY IMMEDIATE | ||
130 | CREATE INDEX IDX_635D765EA76ED395 ON wallabag_oauth2_clients (user_id) | ||
131 | |||
132 | |||
133 | Migration down | ||
134 | """""""""""""" | ||
135 | |||
136 | .. code-block:: sql | ||
137 | |||
138 | ALTER TABLE wallabag_oauth2_clients DROP CONSTRAINT idx_user_oauth_client | ||
139 | ALTER TABLE wallabag_oauth2_clients DROP user_id | ||
140 | |||
141 | SQLite | ||
142 | ^^^^^^ | ||
143 | |||
144 | Migration up | ||
145 | """""""""""" | ||
146 | |||
147 | .. code-block:: sql | ||
148 | |||
149 | CREATE TEMPORARY TABLE __temp__wallabag_oauth2_clients AS SELECT id, random_id, redirect_uris, secret, allowed_grant_types, name FROM wallabag_oauth2_clients | ||
150 | DROP TABLE wallabag_oauth2_clients | ||
151 | CREATE TABLE wallabag_oauth2_clients (id INTEGER NOT NULL, user_id INTEGER DEFAULT NULL, random_id VARCHAR(255) NOT NULL COLLATE BINARY, redirect_uris CLOB NOT NULL COLLATE BINARY, secret VARCHAR(255) NOT NULL COLLATE BINARY, allowed_grant_types CLOB NOT NULL COLLATE BINARY, name CLOB DEFAULT NULL COLLATE BINARY, PRIMARY KEY(id), CONSTRAINT IDX_user_oauth_client FOREIGN KEY (user_id) REFERENCES wallabag_user (id) ON DELETE CASCADE NOT DEFERRABLE INITIALLY IMMEDIATE) | ||
152 | INSERT INTO wallabag_oauth2_clients (id, random_id, redirect_uris, secret, allowed_grant_types, name) SELECT id, random_id, redirect_uris, secret, allowed_grant_types, name FROM __temp__wallabag_oauth2_clients | ||
153 | DROP TABLE __temp__wallabag_oauth2_clients | ||
154 | CREATE INDEX IDX_635D765EA76ED395 ON wallabag_oauth2_clients (user_id) | ||
155 | |||
156 | Migration down | ||
157 | """""""""""""" | ||
158 | |||
159 | .. code-block:: sql | ||
160 | |||
161 | DROP INDEX IDX_635D765EA76ED395 | ||
162 | CREATE TEMPORARY TABLE __temp__wallabag_oauth2_clients AS SELECT id, random_id, redirect_uris, secret, allowed_grant_types, name FROM wallabag_oauth2_clients | ||
163 | DROP TABLE wallabag_oauth2_clients | ||
164 | CREATE TABLE wallabag_oauth2_clients (id INTEGER NOT NULL, random_id VARCHAR(255) NOT NULL COLLATE BINARY, redirect_uris CLOB NOT NULL COLLATE BINARY, secret VARCHAR(255) NOT NULL COLLATE BINARY, allowed_grant_types CLOB NOT NULL COLLATE BINARY, name CLOB DEFAULT NULL COLLATE BINARY, PRIMARY KEY(id)) | ||
165 | INSERT INTO wallabag_oauth2_clients (id, random_id, redirect_uris, secret, allowed_grant_types, name) SELECT id, random_id, redirect_uris, secret, allowed_grant_types, name FROM __temp__wallabag_oauth2_clients | ||
166 | DROP TABLE __temp__wallabag_oauth2_clients | ||
167 | |||
168 | Migration 20161031132655 | ||
169 | ------------------------ | ||
170 | |||
171 | MySQL | ||
172 | ^^^^^ | ||
173 | |||
174 | Migration up | ||
175 | """""""""""" | ||
176 | |||
177 | .. code-block:: sql | ||
178 | |||
179 | INSERT INTO wallabag_craue_config_setting (name, value, section) VALUES ('download_images_enabled', 0, 'misc') | ||
180 | |||
181 | Migration down | ||
182 | """""""""""""" | ||
183 | |||
184 | .. code-block:: sql | ||
185 | |||
186 | DELETE FROM wallabag_craue_config_setting WHERE name = 'download_images_enabled'; | ||
187 | |||
188 | PostgreSQL | ||
189 | ^^^^^^^^^^ | ||
190 | |||
191 | Migration up | ||
192 | """""""""""" | ||
193 | |||
194 | .. code-block:: sql | ||
195 | |||
196 | INSERT INTO wallabag_craue_config_setting (name, value, section) VALUES ('download_images_enabled', 0, 'misc') | ||
197 | |||
198 | Migration down | ||
199 | """""""""""""" | ||
200 | |||
201 | .. code-block:: sql | ||
202 | |||
203 | DELETE FROM wallabag_craue_config_setting WHERE name = 'download_images_enabled'; | ||
204 | |||
205 | SQLite | ||
206 | ^^^^^^ | ||
207 | |||
208 | Migration up | ||
209 | """""""""""" | ||
210 | |||
211 | .. code-block:: sql | ||
212 | |||
213 | INSERT INTO wallabag_craue_config_setting (name, value, section) VALUES ('download_images_enabled', 0, 'misc') | ||
214 | |||
215 | Migration down | ||
216 | """""""""""""" | ||
217 | |||
218 | .. code-block:: sql | ||
219 | |||
220 | DELETE FROM wallabag_craue_config_setting WHERE name = 'download_images_enabled'; | ||
221 | |||
222 | Migration 20161104073720 | ||
223 | ------------------------ | ||
224 | |||
225 | MySQL | ||
226 | ^^^^^ | ||
227 | |||
228 | Migration up | ||
229 | """""""""""" | ||
230 | |||
231 | .. code-block:: sql | ||
232 | |||
233 | CREATE INDEX IDX_entry_created_at ON wallabag_entry (created_at) | ||
234 | |||
235 | Migration down | ||
236 | """""""""""""" | ||
237 | |||
238 | .. code-block:: sql | ||
239 | |||
240 | DROP INDEX IDX_entry_created_at ON wallabag_entry | ||
241 | |||
242 | PostgreSQL | ||
243 | ^^^^^^^^^^ | ||
244 | |||
245 | Migration up | ||
246 | """""""""""" | ||
247 | |||
248 | .. code-block:: sql | ||
249 | |||
250 | CREATE INDEX IDX_entry_created_at ON wallabag_entry (created_at) | ||
251 | |||
252 | Migration down | ||
253 | """""""""""""" | ||
254 | |||
255 | .. code-block:: sql | ||
256 | |||
257 | DROP INDEX idx_entry_created_at | ||
258 | |||
259 | SQLite | ||
260 | ^^^^^^ | ||
261 | |||
262 | Migration up | ||
263 | """""""""""" | ||
264 | |||
265 | .. code-block:: sql | ||
266 | |||
267 | DROP INDEX created_at_idx | ||
268 | DROP INDEX IDX_F4D18282A76ED395 | ||
269 | CREATE TEMPORARY TABLE __temp__wallabag_entry AS SELECT id, user_id, uuid, title, url, is_archived, is_starred, content, created_at, updated_at, mimetype, language, reading_time, domain_name, preview_picture, is_public FROM wallabag_entry | ||
270 | DROP TABLE wallabag_entry | ||
271 | CREATE TABLE wallabag_entry (id INTEGER NOT NULL, user_id INTEGER DEFAULT NULL, uuid CLOB DEFAULT NULL COLLATE BINARY, 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, reading_time INTEGER DEFAULT NULL, domain_name CLOB DEFAULT NULL COLLATE BINARY, preview_picture CLOB DEFAULT NULL COLLATE BINARY, is_public BOOLEAN DEFAULT '0', PRIMARY KEY(id)) | ||
272 | INSERT INTO wallabag_entry (id, user_id, uuid, title, url, is_archived, is_starred, content, created_at, updated_at, mimetype, language, reading_time, domain_name, preview_picture, is_public) SELECT id, user_id, uuid, title, url, is_archived, is_starred, content, created_at, updated_at, mimetype, language, reading_time, domain_name, preview_picture, is_public FROM __temp__wallabag_entry | ||
273 | DROP TABLE __temp__wallabag_entry | ||
274 | CREATE INDEX created_at_idx ON wallabag_entry (created_at) | ||
275 | CREATE INDEX IDX_F4D18282A76ED395 ON wallabag_entry (user_id) | ||
276 | CREATE INDEX IDX_entry_created_at ON wallabag_entry (created_at) | ||
277 | |||
278 | Migration down | ||
279 | """""""""""""" | ||
280 | |||
281 | .. code-block:: sql | ||
282 | |||
283 | DROP INDEX IDX_entry_created_at | ||
284 | DROP INDEX IDX_F4D18282A76ED395 | ||
285 | DROP INDEX created_at_idx | ||
286 | CREATE TEMPORARY TABLE __temp__wallabag_entry AS SELECT id, user_id, uuid, title, url, is_archived, is_starred, content, created_at, updated_at, mimetype, language, reading_time, domain_name, preview_picture, is_public FROM wallabag_entry | ||
287 | DROP TABLE wallabag_entry | ||
288 | CREATE TABLE wallabag_entry (id INTEGER NOT NULL, user_id INTEGER DEFAULT NULL, uuid CLOB DEFAULT NULL COLLATE BINARY, 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, reading_time INTEGER DEFAULT NULL, domain_name CLOB DEFAULT NULL COLLATE BINARY, preview_picture CLOB DEFAULT NULL COLLATE BINARY, is_public BOOLEAN DEFAULT '0', PRIMARY KEY(id)) | ||
289 | INSERT INTO wallabag_entry (id, user_id, uuid, title, url, is_archived, is_starred, content, created_at, updated_at, mimetype, language, reading_time, domain_name, preview_picture, is_public) SELECT id, user_id, uuid, title, url, is_archived, is_starred, content, created_at, updated_at, mimetype, language, reading_time, domain_name, preview_picture, is_public FROM __temp__wallabag_entry | ||
290 | DROP TABLE __temp__wallabag_entry | ||
291 | CREATE INDEX IDX_F4D18282A76ED395 ON wallabag_entry (user_id) | ||
292 | CREATE INDEX created_at_idx ON wallabag_entry (created_at) | ||
293 | |||
294 | Migration 20161106113822 | ||
295 | ------------------------ | ||
296 | |||
297 | MySQL | ||
298 | ^^^^^ | ||
299 | |||
300 | Migration up | ||
301 | """""""""""" | ||
302 | |||
303 | .. code-block:: sql | ||
304 | |||
305 | ALTER TABLE wallabag_config ADD action_mark_as_read INT DEFAULT 0 | ||
306 | |||
307 | Migration down | ||
308 | """""""""""""" | ||
309 | |||
310 | .. code-block:: sql | ||
311 | |||
312 | ALTER TABLE wallabag_config DROP action_mark_as_read | ||
313 | |||
314 | PostgreSQL | ||
315 | ^^^^^^^^^^ | ||
316 | |||
317 | Migration up | ||
318 | """""""""""" | ||
319 | |||
320 | .. code-block:: sql | ||
321 | |||
322 | ALTER TABLE wallabag_config ADD action_mark_as_read INT DEFAULT 0 | ||
323 | |||
324 | Migration down | ||
325 | """""""""""""" | ||
326 | |||
327 | .. code-block:: sql | ||
328 | |||
329 | ALTER TABLE wallabag_config DROP action_mark_as_read | ||
330 | |||
331 | SQLite | ||
332 | ^^^^^^ | ||
333 | |||
334 | Migration up | ||
335 | """""""""""" | ||
336 | |||
337 | .. code-block:: sql | ||
338 | |||
339 | ALTER TABLE wallabag_config ADD COLUMN action_mark_as_read INTEGER DEFAULT 0 | ||
340 | |||
341 | Migration down | ||
342 | """""""""""""" | ||
343 | |||
344 | .. code-block:: sql | ||
345 | |||
346 | DROP INDEX UNIQ_87E64C53A76ED395 | ||
347 | CREATE TEMPORARY TABLE __temp__wallabag_config AS SELECT id, user_id, theme, items_per_page, language, rss_token, rss_limit, reading_speed, pocket_consumer_key FROM wallabag_config | ||
348 | DROP TABLE wallabag_config | ||
349 | CREATE TABLE wallabag_config (id INTEGER 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, rss_token VARCHAR(255) DEFAULT NULL COLLATE BINARY, rss_limit INTEGER DEFAULT NULL, reading_speed DOUBLE PRECISION DEFAULT NULL, pocket_consumer_key VARCHAR(255) DEFAULT NULL COLLATE BINARY, PRIMARY KEY(id)) | ||
350 | INSERT INTO wallabag_config (id, user_id, theme, items_per_page, language, rss_token, rss_limit, reading_speed, pocket_consumer_key) SELECT id, user_id, theme, items_per_page, language, rss_token, rss_limit, reading_speed, pocket_consumer_key FROM __temp__wallabag_config | ||
351 | DROP TABLE __temp__wallabag_config | ||
352 | CREATE UNIQUE INDEX UNIQ_87E64C53A76ED395 ON wallabag_config (user_id) | ||
353 | |||
354 | Migration 20161117071626 | ||
355 | ------------------------ | ||
356 | |||
357 | MySQL | ||
358 | ^^^^^ | ||
359 | |||
360 | Migration up | ||
361 | """""""""""" | ||
362 | |||
363 | .. code-block:: sql | ||
364 | |||
365 | INSERT INTO wallabag_craue_config_setting (name, value, section) VALUES ('share_unmark', 0, 'entry') | ||
366 | INSERT INTO wallabag_craue_config_setting (name, value, section) VALUES ('unmark_url', 'https://unmark.it', 'entry') | ||
367 | |||
368 | Migration down | ||
369 | """""""""""""" | ||
370 | |||
371 | .. code-block:: sql | ||
372 | |||
373 | DELETE FROM wallabag_craue_config_setting WHERE name = 'share_unmark'; | ||
374 | DELETE FROM wallabag_craue_config_setting WHERE name = 'unmark_url'; | ||
375 | |||
376 | PostgreSQL | ||
377 | ^^^^^^^^^^ | ||
378 | |||
379 | Migration up | ||
380 | """""""""""" | ||
381 | |||
382 | .. code-block:: sql | ||
383 | |||
384 | INSERT INTO wallabag_craue_config_setting (name, value, section) VALUES ('share_unmark', 0, 'entry') | ||
385 | INSERT INTO wallabag_craue_config_setting (name, value, section) VALUES ('unmark_url', 'https://unmark.it', 'entry') | ||
386 | |||
387 | Migration down | ||
388 | """""""""""""" | ||
389 | |||
390 | .. code-block:: sql | ||
391 | |||
392 | DELETE FROM wallabag_craue_config_setting WHERE name = 'share_unmark'; | ||
393 | DELETE FROM wallabag_craue_config_setting WHERE name = 'unmark_url'; | ||
394 | |||
395 | SQLite | ||
396 | ^^^^^^ | ||
397 | |||
398 | Migration up | ||
399 | """""""""""" | ||
400 | |||
401 | .. code-block:: sql | ||
402 | |||
403 | INSERT INTO wallabag_craue_config_setting (name, value, section) VALUES ('share_unmark', 0, 'entry') | ||
404 | INSERT INTO wallabag_craue_config_setting (name, value, section) VALUES ('unmark_url', 'https://unmark.it', 'entry') | ||
405 | |||
406 | Migration down | ||
407 | """""""""""""" | ||
408 | |||
409 | .. code-block:: sql | ||
410 | |||
411 | DELETE FROM wallabag_craue_config_setting WHERE name = 'share_unmark'; | ||
412 | DELETE FROM wallabag_craue_config_setting WHERE name = 'unmark_url'; | ||
413 | |||
414 | Migration 20161118134328 | ||
415 | ------------------------ | ||
416 | |||
417 | MySQL | ||
418 | ^^^^^ | ||
419 | |||
420 | Migration up | ||
421 | """""""""""" | ||
422 | |||
423 | .. code-block:: sql | ||
424 | |||
425 | ALTER TABLE wallabag_entry ADD http_status VARCHAR(3) DEFAULT NULL | ||
426 | |||
427 | Migration down | ||
428 | """""""""""""" | ||
429 | |||
430 | .. code-block:: sql | ||
431 | |||
432 | ALTER TABLE wallabag_entry DROP http_status | ||
433 | |||
434 | PostgreSQL | ||
435 | ^^^^^^^^^^ | ||
436 | |||
437 | Migration up | ||
438 | """""""""""" | ||
439 | |||
440 | .. code-block:: sql | ||
441 | |||
442 | ALTER TABLE wallabag_entry ADD http_status VARCHAR(3) DEFAULT NULL | ||
443 | |||
444 | Migration down | ||
445 | """""""""""""" | ||
446 | |||
447 | .. code-block:: sql | ||
448 | |||
449 | ALTER TABLE wallabag_entry DROP http_status | ||
450 | |||
451 | SQLite | ||
452 | ^^^^^^ | ||
453 | |||
454 | Migration up | ||
455 | """""""""""" | ||
456 | |||
457 | .. code-block:: sql | ||
458 | |||
459 | ALTER TABLE wallabag_entry ADD COLUMN http_status VARCHAR(3) DEFAULT NULL | ||
460 | |||
461 | Migration down | ||
462 | """""""""""""" | ||
463 | |||
464 | .. code-block:: sql | ||
465 | |||
466 | DROP INDEX created_at_idx | ||
467 | DROP INDEX IDX_F4D18282A76ED395 | ||
468 | CREATE TEMPORARY TABLE __temp__wallabag_entry AS SELECT id, user_id, uuid, title, url, is_archived, is_starred, content, created_at, updated_at, mimetype, language, reading_time, domain_name, preview_picture, is_public FROM wallabag_entry | ||
469 | DROP TABLE wallabag_entry | ||
470 | CREATE TABLE wallabag_entry (id INTEGER NOT NULL, user_id INTEGER DEFAULT NULL, uuid CLOB DEFAULT NULL COLLATE BINARY, 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, reading_time INTEGER DEFAULT NULL, domain_name CLOB DEFAULT NULL COLLATE BINARY, preview_picture CLOB DEFAULT NULL COLLATE BINARY, is_public BOOLEAN DEFAULT '0', PRIMARY KEY(id)) | ||
471 | INSERT INTO wallabag_entry (id, user_id, uuid, title, url, is_archived, is_starred, content, created_at, updated_at, mimetype, language, reading_time, domain_name, preview_picture, is_public) SELECT id, user_id, uuid, title, url, is_archived, is_starred, content, created_at, updated_at, mimetype, language, reading_time, domain_name, preview_picture, is_public FROM __temp__wallabag_entry | ||
472 | DROP TABLE __temp__wallabag_entry | ||
473 | CREATE INDEX created_at_idx ON wallabag_entry (created_at) | ||
474 | CREATE INDEX IDX_F4D18282A76ED395 ON wallabag_entry (user_id) | ||
475 | |||
476 | Migration 20161122144743 | ||
477 | ------------------------ | ||
478 | |||
479 | MySQL | ||
480 | ^^^^^ | ||
481 | |||
482 | Migration up | ||
483 | """""""""""" | ||
484 | |||
485 | .. code-block:: sql | ||
486 | |||
487 | INSERT INTO wallabag_craue_config_setting (name, value, section) VALUES ('restricted_access', 0, 'entry') | ||
488 | |||
489 | Migration down | ||
490 | """""""""""""" | ||
491 | |||
492 | .. code-block:: sql | ||
493 | |||
494 | DELETE FROM wallabag_craue_config_setting WHERE name = 'restricted_access'; | ||
495 | |||
496 | PostgreSQL | ||
497 | ^^^^^^^^^^ | ||
498 | |||
499 | Migration up | ||
500 | """""""""""" | ||
501 | |||
502 | .. code-block:: sql | ||
503 | |||
504 | INSERT INTO wallabag_craue_config_setting (name, value, section) VALUES ('restricted_access', 0, 'entry') | ||
505 | |||
506 | Migration down | ||
507 | """""""""""""" | ||
508 | |||
509 | .. code-block:: sql | ||
510 | |||
511 | DELETE FROM wallabag_craue_config_setting WHERE name = 'restricted_access'; | ||
512 | |||
513 | SQLite | ||
514 | ^^^^^^ | ||
515 | |||
516 | Migration up | ||
517 | """""""""""" | ||
518 | |||
519 | .. code-block:: sql | ||
520 | |||
521 | INSERT INTO wallabag_craue_config_setting (name, value, section) VALUES ('restricted_access', 0, 'entry') | ||
522 | |||
523 | Migration down | ||
524 | """""""""""""" | ||
525 | |||
526 | .. code-block:: sql | ||
527 | |||
528 | DELETE FROM wallabag_craue_config_setting WHERE name = 'restricted_access'; | ||
529 | |||
530 | Migration 20161122203647 | ||
531 | ------------------------ | ||
532 | |||
533 | MySQL | ||
534 | ^^^^^ | ||
535 | |||
536 | Migration up | ||
537 | """""""""""" | ||
538 | |||
539 | .. code-block:: sql | ||
540 | |||
541 | ALTER TABLE wallabag_user DROP expired, DROP credentials_expired | ||
542 | |||
543 | Migration down | ||
544 | """""""""""""" | ||
545 | |||
546 | .. code-block:: sql | ||
547 | |||
548 | ALTER TABLE wallabag_user ADD expired SMALLINT DEFAULT NULL, ADD credentials_expired SMALLINT DEFAULT NULL | ||
549 | |||
550 | PostgreSQL | ||
551 | ^^^^^^^^^^ | ||
552 | |||
553 | Migration up | ||
554 | """""""""""" | ||
555 | |||
556 | .. code-block:: sql | ||
557 | |||
558 | ALTER TABLE wallabag_user DROP expired | ||
559 | ALTER TABLE wallabag_user DROP credentials_expired | ||
560 | |||
561 | Migration down | ||
562 | """""""""""""" | ||
563 | |||
564 | .. code-block:: sql | ||
565 | |||
566 | ALTER TABLE wallabag_user ADD expired SMALLINT DEFAULT NULL | ||
567 | ALTER TABLE wallabag_user ADD credentials_expired SMALLINT DEFAULT NULL | ||
568 | |||
569 | SQLite | ||
570 | ^^^^^^ | ||
571 | |||
572 | Migration up | ||
573 | """""""""""" | ||
574 | |||
575 | .. code-block:: sql | ||
576 | |||
577 | DROP INDEX UNIQ_1D63E7E5C05FB297 | ||
578 | DROP INDEX UNIQ_1D63E7E5A0D96FBF | ||
579 | DROP INDEX UNIQ_1D63E7E592FC23A8 | ||
580 | CREATE TEMPORARY TABLE __temp__wallabag_user AS SELECT id, username, username_canonical, email, email_canonical, enabled, salt, password, last_login, locked, expires_at, confirmation_token, password_requested_at, roles, credentials_expire_at, name, created_at, updated_at, authCode, twoFactorAuthentication, trusted FROM wallabag_user | ||
581 | DROP TABLE wallabag_user | ||
582 | CREATE TABLE wallabag_user (id INTEGER 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, salt VARCHAR(255) NOT NULL COLLATE BINARY, password VARCHAR(255) NOT NULL COLLATE BINARY, last_login DATETIME DEFAULT NULL, locked BOOLEAN NOT NULL, expires_at DATETIME DEFAULT NULL, confirmation_token VARCHAR(180) DEFAULT NULL COLLATE BINARY, password_requested_at DATETIME DEFAULT NULL, roles CLOB NOT NULL COLLATE BINARY, credentials_expire_at DATETIME DEFAULT NULL, name CLOB DEFAULT NULL COLLATE BINARY, created_at DATETIME NOT NULL, updated_at DATETIME NOT NULL, authCode INTEGER DEFAULT NULL, twoFactorAuthentication BOOLEAN NOT NULL, trusted CLOB DEFAULT NULL COLLATE BINARY, PRIMARY KEY(id)) | ||
583 | INSERT INTO wallabag_user (id, username, username_canonical, email, email_canonical, enabled, salt, password, last_login, locked, expires_at, confirmation_token, password_requested_at, roles, credentials_expire_at, name, created_at, updated_at, authCode, twoFactorAuthentication, trusted) SELECT id, username, username_canonical, email, email_canonical, enabled, salt, password, last_login, locked, expires_at, confirmation_token, password_requested_at, roles, credentials_expire_at, name, created_at, updated_at, authCode, twoFactorAuthentication, trusted FROM __temp__wallabag_user | ||
584 | DROP TABLE __temp__wallabag_user | ||
585 | CREATE UNIQUE INDEX UNIQ_1D63E7E5C05FB297 ON wallabag_user (confirmation_token) | ||
586 | CREATE UNIQUE INDEX UNIQ_1D63E7E5A0D96FBF ON wallabag_user (email_canonical) | ||
587 | CREATE UNIQUE INDEX UNIQ_1D63E7E592FC23A8 ON wallabag_user (username_canonical) | ||
588 | |||
589 | Migration down | ||
590 | """""""""""""" | ||
591 | |||
592 | .. code-block:: sql | ||
593 | |||
594 | ALTER TABLE wallabag_user ADD COLUMN expired SMALLINT DEFAULT NULL | ||
595 | ALTER TABLE wallabag_user ADD COLUMN credentials_expired SMALLINT DEFAULT NULL | ||
596 | |||
597 | Migration 20161128084725 | ||
598 | ------------------------ | ||
599 | |||
600 | MySQL | ||
601 | ^^^^^ | ||
602 | |||
603 | Migration up | ||
604 | """""""""""" | ||
605 | |||
606 | .. code-block:: sql | ||
607 | |||
608 | ALTER TABLE wallabag_config ADD list_mode INT DEFAULT NULL | ||
609 | |||
610 | Migration down | ||
611 | """""""""""""" | ||
612 | |||
613 | .. code-block:: sql | ||
614 | |||
615 | ALTER TABLE wallabag_config DROP list_mode | ||
616 | |||
617 | PostgreSQL | ||
618 | ^^^^^^^^^^ | ||
619 | |||
620 | Migration up | ||
621 | """""""""""" | ||
622 | |||
623 | .. code-block:: sql | ||
624 | |||
625 | ALTER TABLE wallabag_config ADD list_mode INT DEFAULT NULL | ||
626 | |||
627 | Migration down | ||
628 | """""""""""""" | ||
629 | |||
630 | .. code-block:: sql | ||
631 | |||
632 | ALTER TABLE wallabag_config DROP list_mode | ||
633 | |||
634 | SQLite | ||
635 | ^^^^^^ | ||
636 | |||
637 | Migration up | ||
638 | """""""""""" | ||
639 | |||
640 | .. code-block:: sql | ||
641 | |||
642 | ALTER TABLE wallabag_config ADD COLUMN list_mode INTEGER DEFAULT NULL | ||
643 | |||
644 | Migration down | ||
645 | """""""""""""" | ||
646 | |||
647 | .. code-block:: sql | ||
648 | |||
649 | DROP INDEX UNIQ_87E64C53A76ED395 | ||
650 | CREATE TEMPORARY TABLE __temp__wallabag_config AS SELECT id, user_id, theme, items_per_page, language, rss_token, rss_limit, reading_speed, pocket_consumer_key FROM wallabag_config | ||
651 | DROP TABLE wallabag_config | ||
652 | CREATE TABLE wallabag_config (id INTEGER 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, rss_token VARCHAR(255) DEFAULT NULL COLLATE BINARY, rss_limit INTEGER DEFAULT NULL, reading_speed DOUBLE PRECISION DEFAULT NULL, pocket_consumer_key VARCHAR(255) DEFAULT NULL COLLATE BINARY, PRIMARY KEY(id)) | ||
653 | INSERT INTO wallabag_config (id, user_id, theme, items_per_page, language, rss_token, rss_limit, reading_speed, pocket_consumer_key) SELECT id, user_id, theme, items_per_page, language, rss_token, rss_limit, reading_speed, pocket_consumer_key FROM __temp__wallabag_config | ||
654 | DROP TABLE __temp__wallabag_config | ||
655 | CREATE UNIQUE INDEX UNIQ_87E64C53A76ED395 ON wallabag_config (user_id) | ||
656 | |||
657 | Migration 20161128131503 | ||
658 | ------------------------ | ||
659 | |||
660 | MySQL | ||
661 | ^^^^^ | ||
662 | |||
663 | Migration up | ||
664 | """""""""""" | ||
665 | |||
666 | .. code-block:: sql | ||
667 | |||
668 | ALTER TABLE wallabag_user DROP locked, DROP credentials_expire_at, DROP expires_at | ||
669 | |||
670 | Migration down | ||
671 | """""""""""""" | ||
672 | |||
673 | .. code-block:: sql | ||
674 | |||
675 | ALTER TABLE wallabag_user ADD locked SMALLINT DEFAULT NULL, ADD credentials_expire_at DATETIME DEFAULT NULL, ADD expires_at DATETIME DEFAULT NULL | ||
676 | |||
677 | PostgreSQL | ||
678 | ^^^^^^^^^^ | ||
679 | |||
680 | Migration up | ||
681 | """""""""""" | ||
682 | |||
683 | .. code-block:: sql | ||
684 | |||
685 | ALTER TABLE wallabag_user DROP locked | ||
686 | ALTER TABLE wallabag_user DROP credentials_expire_at | ||
687 | ALTER TABLE wallabag_user DROP expires_at | ||
688 | |||
689 | Migration down | ||
690 | """""""""""""" | ||
691 | |||
692 | .. code-block:: sql | ||
693 | |||
694 | ALTER TABLE wallabag_user ADD locked SMALLINT DEFAULT NULL | ||
695 | ALTER TABLE wallabag_user ADD credentials_expire_at TIMESTAMP(0) WITHOUT TIME ZONE DEFAULT NULL | ||
696 | ALTER TABLE wallabag_user ADD expires_at TIMESTAMP(0) WITHOUT TIME ZONE DEFAULT NULL | ||
697 | |||
698 | SQLite | ||
699 | ^^^^^^ | ||
700 | |||
701 | Migration up | ||
702 | """""""""""" | ||
703 | |||
704 | .. code-block:: sql | ||
705 | |||
706 | ALTER TABLE wallabag_user ADD COLUMN locked SMALLINT DEFAULT NULL | ||
707 | ALTER TABLE wallabag_user ADD COLUMN credentials_expire_at DATETIME DEFAULT NULL | ||
708 | ALTER TABLE wallabag_user ADD COLUMN expires_at DATETIME DEFAULT NULL | ||
709 | |||
710 | Migration down | ||
711 | """""""""""""" | ||
712 | |||
713 | .. code-block:: sql | ||
714 | |||
715 | DROP INDEX UNIQ_1D63E7E592FC23A8 | ||
716 | DROP INDEX UNIQ_1D63E7E5A0D96FBF | ||
717 | DROP INDEX UNIQ_1D63E7E5C05FB297 | ||
718 | CREATE TEMPORARY TABLE __temp__wallabag_user 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, trusted, expired, credentials_expired FROM wallabag_user | ||
719 | DROP TABLE wallabag_user | ||
720 | CREATE TABLE wallabag_user (id INTEGER 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, salt VARCHAR(255) NOT NULL COLLATE BINARY, password VARCHAR(255) NOT NULL COLLATE BINARY, last_login DATETIME DEFAULT NULL, confirmation_token VARCHAR(180) DEFAULT NULL COLLATE BINARY, password_requested_at DATETIME DEFAULT NULL, roles CLOB NOT NULL COLLATE BINARY, name CLOB DEFAULT NULL COLLATE BINARY, created_at DATETIME NOT NULL, updated_at DATETIME NOT NULL, authCode INTEGER DEFAULT NULL, twoFactorAuthentication BOOLEAN NOT NULL, trusted CLOB DEFAULT NULL COLLATE BINARY, expired SMALLINT DEFAULT NULL, credentials_expired SMALLINT DEFAULT NULL, PRIMARY KEY(id)) | ||
721 | INSERT INTO wallabag_user (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, trusted, expired, credentials_expired) 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, trusted, expired, credentials_expired FROM __temp__wallabag_user | ||
722 | DROP TABLE __temp__wallabag_user | ||
723 | CREATE UNIQUE INDEX UNIQ_1D63E7E592FC23A8 ON wallabag_user (username_canonical) | ||
724 | CREATE UNIQUE INDEX UNIQ_1D63E7E5A0D96FBF ON wallabag_user (email_canonical) | ||
725 | CREATE UNIQUE INDEX UNIQ_1D63E7E5C05FB297 ON wallabag_user (confirmation_token) | ||
726 | |||
727 | Migration 20161214094403 | ||
728 | ------------------------ | ||
729 | |||
730 | MySQL | ||
731 | ^^^^^ | ||
732 | |||
733 | Migration up | ||
734 | """""""""""" | ||
735 | |||
736 | .. code-block:: sql | ||
737 | |||
738 | CREATE INDEX IDX_entry_uid ON wallabag_entry (uid) | ||
739 | |||
740 | Migration down | ||
741 | """""""""""""" | ||
742 | |||
743 | .. code-block:: sql | ||
744 | |||
745 | DROP INDEX IDX_entry_uid ON wallabag_entry | ||
746 | |||
747 | PostgreSQL | ||
748 | ^^^^^^^^^^ | ||
749 | |||
750 | Migration up | ||
751 | """""""""""" | ||
752 | |||
753 | .. code-block:: sql | ||
754 | |||
755 | CREATE INDEX IDX_entry_uid ON wallabag_entry (uid) | ||
756 | |||
757 | Migration down | ||
758 | """""""""""""" | ||
759 | |||
760 | .. code-block:: sql | ||
761 | |||
762 | DROP INDEX idx_entry_uid | ||
763 | |||
764 | SQLite | ||
765 | ^^^^^^ | ||
766 | |||
767 | Migration up | ||
768 | """""""""""" | ||
769 | |||
770 | .. code-block:: sql | ||
771 | |||
772 | DROP INDEX IDX_F4D18282A76ED395 | ||
773 | DROP INDEX created_at_idx | ||
774 | CREATE TEMPORARY TABLE __temp__wallabag_entry AS SELECT id, user_id, uid, title, url, is_archived, is_starred, content, created_at, updated_at, mimetype, language, reading_time, domain_name, preview_picture, is_public FROM wallabag_entry | ||
775 | DROP TABLE wallabag_entry | ||
776 | CREATE TABLE wallabag_entry (id INTEGER NOT NULL, user_id INTEGER DEFAULT NULL, uid CLOB DEFAULT NULL COLLATE BINARY, 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, reading_time INTEGER DEFAULT NULL, domain_name CLOB DEFAULT NULL COLLATE BINARY, preview_picture CLOB DEFAULT NULL COLLATE BINARY, is_public BOOLEAN DEFAULT '0', PRIMARY KEY(id)) | ||
777 | INSERT INTO wallabag_entry (id, user_id, uid, title, url, is_archived, is_starred, content, created_at, updated_at, mimetype, language, reading_time, domain_name, preview_picture, is_public) SELECT id, user_id, uid, title, url, is_archived, is_starred, content, created_at, updated_at, mimetype, language, reading_time, domain_name, preview_picture, is_public FROM __temp__wallabag_entry | ||
778 | DROP TABLE __temp__wallabag_entry | ||
779 | CREATE INDEX IDX_F4D18282A76ED395 ON wallabag_entry (user_id) | ||
780 | CREATE INDEX created_at_idx ON wallabag_entry (created_at) | ||
781 | CREATE INDEX IDX_entry_uid ON wallabag_entry (uid) | ||
782 | |||
783 | Migration down | ||
784 | """""""""""""" | ||
785 | |||
786 | .. code-block:: sql | ||
787 | |||
788 | DROP INDEX IDX_entry_uid | ||
789 | DROP INDEX created_at_idx | ||
790 | DROP INDEX IDX_F4D18282A76ED395 | ||
791 | CREATE TEMPORARY TABLE __temp__wallabag_entry AS SELECT id, user_id, uid, title, url, is_archived, is_starred, content, created_at, updated_at, mimetype, language, reading_time, domain_name, preview_picture, is_public FROM wallabag_entry | ||
792 | DROP TABLE wallabag_entry | ||
793 | CREATE TABLE wallabag_entry (id INTEGER NOT NULL, user_id INTEGER DEFAULT NULL, uid CLOB DEFAULT NULL COLLATE BINARY, 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, reading_time INTEGER DEFAULT NULL, domain_name CLOB DEFAULT NULL COLLATE BINARY, preview_picture CLOB DEFAULT NULL COLLATE BINARY, is_public BOOLEAN DEFAULT '0', PRIMARY KEY(id)) | ||
794 | INSERT INTO wallabag_entry (id, user_id, uid, title, url, is_archived, is_starred, content, created_at, updated_at, mimetype, language, reading_time, domain_name, preview_picture, is_public) SELECT id, user_id, uid, title, url, is_archived, is_starred, content, created_at, updated_at, mimetype, language, reading_time, domain_name, preview_picture, is_public FROM __temp__wallabag_entry | ||
795 | DROP TABLE __temp__wallabag_entry | ||
796 | CREATE INDEX created_at_idx ON wallabag_entry (created_at) | ||
797 | CREATE INDEX IDX_F4D18282A76ED395 ON wallabag_entry (user_id) | ||
diff --git a/docs/fr/user/upgrade.rst b/docs/fr/user/upgrade.rst index 9aaa7782..088b19a0 100644 --- a/docs/fr/user/upgrade.rst +++ b/docs/fr/user/upgrade.rst | |||
@@ -3,41 +3,53 @@ Mettre à jour votre installation de wallabag | |||
3 | 3 | ||
4 | Vous trouverez ici différentes manières de mettre à jour wallabag : | 4 | Vous trouverez ici différentes manières de mettre à jour wallabag : |
5 | 5 | ||
6 | - `de la 2.1.x à la 2.2.x <#mettre-a-jour-de-la-2-1-x-a-la-2-2-x>`_ | ||
6 | - `de la 2.0.x à la 2.1.1 <#mettre-a-jour-de-la-2-0-x-a-la-2-1-1>`_ | 7 | - `de la 2.0.x à la 2.1.1 <#mettre-a-jour-de-la-2-0-x-a-la-2-1-1>`_ |
7 | - `de la 2.1.x à la 2.1.y <#mettre-a-jour-de-la-2-1-x-a-la-2-1-y>`_ | ||
8 | - `de la 1.x à la 2.x <#depuis-wallabag-1-x>`_ | 8 | - `de la 1.x à la 2.x <#depuis-wallabag-1-x>`_ |
9 | 9 | ||
10 | Mettre à jour de la 2.0.x à la 2.1.1 | 10 | Mettre à jour de la 2.1.x à la 2.2.x |
11 | ------------------------------------ | 11 | ------------------------------------ |
12 | 12 | ||
13 | .. warning:: | ||
14 | Avant cette migration, si vous aviez configuré l'import depuis Pocket en ajoutant votre consumer key dans les paramètres internes, pensez à effectuer une sauvegarde de celle-ci : vous devrez l'ajouter dans la configuration de wallabag après la mise à jour. | ||
15 | |||
16 | Mise à jour sur un serveur dédié | 13 | Mise à jour sur un serveur dédié |
17 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | 14 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
18 | 15 | ||
19 | :: | 16 | :: |
20 | 17 | ||
21 | rm -rf var/cache/* | 18 | make update |
22 | git fetch origin | 19 | |
23 | git fetch --tags | 20 | Explications à propos des migrations de base de données |
24 | git checkout 2.1.1 --force | 21 | """"""""""""""""""""""""""""""""""""""""""""""""""""""" |
25 | SYMFONY_ENV=prod composer install --no-dev -o --prefer-dist | 22 | |
26 | php bin/console doctrine:migrations:migrate --env=prod | 23 | Durant la mise à jour, nous exécutons des migrations de base de données. |
27 | php bin/console cache:clear --env=prod | 24 | |
25 | Toutes les migrations de base de données sont stockées dans le dossier ``app/DoctrineMigrations``. Vous pouvez exécuter chaque migration individuellement : | ||
26 | ``bin/console doctrine:migrations:execute 20161001072726 --env=prod``. | ||
27 | |||
28 | Voici la liste des migrations de la 2.1.x à la 2.2.0 : | ||
29 | |||
30 | * ``20161001072726``: ajout de clés étrangères pour la réinitialisation de compte | ||
31 | * ``20161022134138``: conversion de la base de données à l'encodage ``utf8mb4`` (pour MySQL uniquement) | ||
32 | * ``20161024212538``: ajout de la colonne ``user_id`` sur la table ``oauth2_clients`` pour empêcher les utilisateurs de supprimer des clients API d'autres utilisateurs | ||
33 | * ``20161031132655``: ajout du paramètre interne pour activer/désactiver le téléchargement des images | ||
34 | * ``20161104073720``: ajout de l'index ``created_at`` sur la table ``entry`` | ||
35 | * ``20161106113822``: ajout du champ ``action_mark_as_read`` sur la table ``config`` | ||
36 | * ``20161117071626``: ajout du paramètre interne pour partager ses articles vers unmark.it | ||
37 | * ``20161118134328``: ajout du champ ``http_status`` sur la table ``entry`` | ||
38 | * ``20161122144743``: ajout du paramètre interne pour activer/désactiver la récupération d'articles derrière un paywall | ||
39 | * ``20161122203647``: suppression des champs ``expired`` et ``credentials_expired`` sur la table ``user`` | ||
28 | 40 | ||
29 | Mise à jour sur un hébergement mutualisé | 41 | Mise à jour sur un hébergement mutualisé |
30 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | 42 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
31 | 43 | ||
32 | Effectuez une sauvegarde du fichier ``app/config/parameters.yml``. | 44 | Effectuez une sauvegarde du fichier ``app/config/parameters.yml``. |
33 | 45 | ||
34 | Téléchargez la version 2.1.1 de wallabag : | 46 | Téléchargez la dernière version de wallabag : |
35 | 47 | ||
36 | .. code-block:: bash | 48 | .. code-block:: bash |
37 | 49 | ||
38 | wget https://framabag.org/wallabag-release-2.1.1.tar.gz && tar xvf wallabag-release-2.1.1.tar.gz | 50 | wget http://wllbg.org/latest-v2-package && tar xvf latest-v2-package |
39 | 51 | ||
40 | (hash md5 de l'archive 2.1.1 : ``9584a3b60a2b2a4de87f536548caac93``) | 52 | Vous trouverez `le hash md5 du dernier package sur notre site <https://www.wallabag.org/pages/download-wallabag.html>`_. |
41 | 53 | ||
42 | Décompressez l'archive dans votre répertoire d'installation et remplacez le fichier ``app/config/parameters.yml`` avec le votre. | 54 | Décompressez l'archive dans votre répertoire d'installation et remplacez le fichier ``app/config/parameters.yml`` avec le votre. |
43 | 55 | ||
@@ -47,42 +59,42 @@ Si vous utilisez SQLite, vous devez également conserver le contenu du répertoi | |||
47 | 59 | ||
48 | Videz le répertoire ``var/cache``. | 60 | Videz le répertoire ``var/cache``. |
49 | 61 | ||
50 | Vous allez devoir également exécuter des requêtes SQL pour mettre à jour votre base de données. Nous partons du principe que le préfixe de vos tables est ``wallabag_`` et que le serveur SQL est un serveur MySQL : | 62 | Vous allez devoir également exécuter des requêtes SQL pour mettre à jour votre base de données. Nous partons du principe que le préfixe de vos tables est ``wallabag_``. |
51 | 63 | ||
52 | .. code-block:: sql | 64 | `Vous trouverez toutes les requêtes à exécuter ici <http://doc.wallabag.org/fr/master/user/query-upgrade-21-22.html>`_. |
53 | 65 | ||
54 | ALTER TABLE `wallabag_entry` ADD `uuid` LONGTEXT DEFAULT NULL; | ||
55 | INSERT INTO `wallabag_craue_config_setting` (`name`, `value`, `section`) VALUES ('share_public', '1', 'entry'); | ||
56 | ALTER TABLE `wallabag_oauth2_clients` ADD name longtext COLLATE 'utf8_unicode_ci' DEFAULT NULL; | ||
57 | INSERT INTO `wallabag_craue_config_setting` (`name`, `value`, `section`) VALUES ('import_with_redis', '0', 'import'); | ||
58 | INSERT INTO `wallabag_craue_config_setting` (`name`, `value`, `section`) VALUES ('import_with_rabbitmq', '0', 'import'); | ||
59 | ALTER TABLE `wallabag_config` ADD `pocket_consumer_key` VARCHAR(255) DEFAULT NULL; | ||
60 | DELETE FROM `wallabag_craue_config_setting` WHERE `name` = 'pocket_consumer_key'; | ||
61 | 66 | ||
62 | Mettre à jour de la 2.1.x à la 2.1.y | 67 | Mettre à jour de la 2.0.x à la 2.1.1 |
63 | ------------------------------------ | 68 | ------------------------------------ |
64 | 69 | ||
70 | .. warning:: | ||
71 | Avant cette migration, si vous aviez configuré l'import depuis Pocket en ajoutant votre consumer key dans les paramètres internes, pensez à effectuer une sauvegarde de celle-ci : vous devrez l'ajouter dans la configuration de wallabag après la mise à jour. | ||
72 | |||
65 | Mise à jour sur un serveur dédié | 73 | Mise à jour sur un serveur dédié |
66 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | 74 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
67 | 75 | ||
68 | Pour mettre à jour votre installation de wallabag et récupérer la dernière version, exécutez la commande suivante dans votre répertoire d'installation : | ||
69 | |||
70 | :: | 76 | :: |
71 | 77 | ||
72 | make update | 78 | rm -rf var/cache/* |
79 | git fetch origin | ||
80 | git fetch --tags | ||
81 | git checkout 2.1.1 --force | ||
82 | SYMFONY_ENV=prod composer install --no-dev -o --prefer-dist | ||
83 | php bin/console doctrine:migrations:migrate --env=prod | ||
84 | php bin/console cache:clear --env=prod | ||
73 | 85 | ||
74 | Mise à jour sur un hébergement mutualisé | 86 | Mise à jour sur un hébergement mutualisé |
75 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | 87 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
76 | 88 | ||
77 | Effectuez une sauvegarde du fichier ``app/config/parameters.yml``. | 89 | Effectuez une sauvegarde du fichier ``app/config/parameters.yml``. |
78 | 90 | ||
79 | Téléchargez la dernière version de wallabag : | 91 | Téléchargez la version 2.1.1 de wallabag : |
80 | 92 | ||
81 | .. code-block:: bash | 93 | .. code-block:: bash |
82 | 94 | ||
83 | wget https://wllbg.org/latest-v2-package && tar xvf latest-v2-package | 95 | wget http://framabag.org/wallabag-release-2.1.1.tar.gz && tar xvf wallabag-release-2.1.1.tar.gz |
84 | 96 | ||
85 | Vous trouverez `le hash md5 du dernier package sur notre site <https://www.wallabag.org/pages/download-wallabag.html>`_. | 97 | (hash md5 de l'archive 2.1.1 : ``9584a3b60a2b2a4de87f536548caac93``) |
86 | 98 | ||
87 | Décompressez l'archive dans votre répertoire d'installation et remplacez le fichier ``app/config/parameters.yml`` avec le votre. | 99 | Décompressez l'archive dans votre répertoire d'installation et remplacez le fichier ``app/config/parameters.yml`` avec le votre. |
88 | 100 | ||
@@ -92,6 +104,18 @@ Si vous utilisez SQLite, vous devez également conserver le contenu du répertoi | |||
92 | 104 | ||
93 | Videz le répertoire ``var/cache``. | 105 | Videz le répertoire ``var/cache``. |
94 | 106 | ||
107 | Vous allez devoir également exécuter des requêtes SQL pour mettre à jour votre base de données. Nous partons du principe que le préfixe de vos tables est ``wallabag_`` et que le serveur SQL est un serveur MySQL : | ||
108 | |||
109 | .. code-block:: sql | ||
110 | |||
111 | ALTER TABLE `wallabag_entry` ADD `uuid` LONGTEXT DEFAULT NULL; | ||
112 | INSERT INTO `wallabag_craue_config_setting` (`name`, `value`, `section`) VALUES ('share_public', '1', 'entry'); | ||
113 | ALTER TABLE `wallabag_oauth2_clients` ADD name longtext COLLATE 'utf8_unicode_ci' DEFAULT NULL; | ||
114 | INSERT INTO `wallabag_craue_config_setting` (`name`, `value`, `section`) VALUES ('import_with_redis', '0', 'import'); | ||
115 | INSERT INTO `wallabag_craue_config_setting` (`name`, `value`, `section`) VALUES ('import_with_rabbitmq', '0', 'import'); | ||
116 | ALTER TABLE `wallabag_config` ADD `pocket_consumer_key` VARCHAR(255) DEFAULT NULL; | ||
117 | DELETE FROM `wallabag_craue_config_setting` WHERE `name` = 'pocket_consumer_key'; | ||
118 | |||
95 | Depuis wallabag 1.x | 119 | Depuis wallabag 1.x |
96 | ------------------- | 120 | ------------------- |
97 | 121 | ||
diff --git a/scripts/update.sh b/scripts/update.sh index a29e0168..e6ed58b7 100644 --- a/scripts/update.sh +++ b/scripts/update.sh | |||
@@ -16,4 +16,5 @@ git fetch --tags | |||
16 | TAG=$(git describe --tags $(git rev-list --tags --max-count=1)) | 16 | TAG=$(git describe --tags $(git rev-list --tags --max-count=1)) |
17 | git checkout $TAG --force | 17 | git checkout $TAG --force |
18 | SYMFONY_ENV=$ENV $COMPOSER_COMMAND install --no-dev -o --prefer-dist | 18 | SYMFONY_ENV=$ENV $COMPOSER_COMMAND install --no-dev -o --prefer-dist |
19 | php bin/console doctrine:migrations:migrate --no-interaction --env=$ENV | ||
19 | php bin/console cache:clear --env=$ENV | 20 | php bin/console cache:clear --env=$ENV |