aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorNicolas LÅ“uillet <nicolas@loeuillet.org>2017-01-23 14:16:00 +0100
committerNicolas LÅ“uillet <nicolas@loeuillet.org>2017-01-23 14:16:00 +0100
commit4acbeb93717612f361627f7d4b946fcb4477823c (patch)
treecf5856dce4a254535a9ea862ca7b072fcf0424b9
parentb87f1712336564ec14e37487f512568bc4d986f7 (diff)
downloadwallabag-4acbeb93717612f361627f7d4b946fcb4477823c.tar.gz
wallabag-4acbeb93717612f361627f7d4b946fcb4477823c.tar.zst
wallabag-4acbeb93717612f361627f7d4b946fcb4477823c.zip
Added hardcoded SQL for migration to 2.2
-rw-r--r--app/DoctrineMigrations/Version20161001072726.php1
-rw-r--r--app/DoctrineMigrations/Version20161024212538.php16
-rw-r--r--app/DoctrineMigrations/Version20161106113822.php5
-rw-r--r--app/DoctrineMigrations/Version20161118134328.php7
-rw-r--r--app/DoctrineMigrations/Version20161122203647.php7
-rw-r--r--app/DoctrineMigrations/Version20161128131503.php2
-rw-r--r--docs/en/user/upgrade.rst819
7 files changed, 840 insertions, 17 deletions
diff --git a/app/DoctrineMigrations/Version20161001072726.php b/app/DoctrineMigrations/Version20161001072726.php
index b5d104cd..f247c236 100644
--- a/app/DoctrineMigrations/Version20161001072726.php
+++ b/app/DoctrineMigrations/Version20161001072726.php
@@ -6,6 +6,7 @@ use Doctrine\DBAL\Migrations\AbstractMigration;
6use Doctrine\DBAL\Schema\Schema; 6use Doctrine\DBAL\Schema\Schema;
7use Symfony\Component\DependencyInjection\ContainerAwareInterface; 7use Symfony\Component\DependencyInjection\ContainerAwareInterface;
8use Symfony\Component\DependencyInjection\ContainerInterface; 8use Symfony\Component\DependencyInjection\ContainerInterface;
9use Doctrine\DBAL\Migrations\SkipMigrationException;
9 10
10/** 11/**
11 * Added pocket_consumer_key field on wallabag_config 12 * Added pocket_consumer_key field on wallabag_config
diff --git a/app/DoctrineMigrations/Version20161024212538.php b/app/DoctrineMigrations/Version20161024212538.php
index 0c5a53da..ecb872d1 100644
--- a/app/DoctrineMigrations/Version20161024212538.php
+++ b/app/DoctrineMigrations/Version20161024212538.php
@@ -17,6 +17,8 @@ class Version20161024212538 extends AbstractMigration implements ContainerAwareI
17 */ 17 */
18 private $container; 18 private $container;
19 19
20 private $constraintName = 'IDX_user_oauth_client';
21
20 public function setContainer(ContainerInterface $container = null) 22 public function setContainer(ContainerInterface $container = null)
21 { 23 {
22 $this->container = $container; 24 $this->container = $container;
@@ -36,13 +38,14 @@ class Version20161024212538 extends AbstractMigration implements ContainerAwareI
36 38
37 $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.');
38 40
39 $clientsTable->addColumn('user_id', 'integer'); 41 $clientsTable->addColumn('user_id', 'integer', ['notnull' => false]);
40 42
41 $clientsTable->addForeignKeyConstraint( 43 $clientsTable->addForeignKeyConstraint(
42 $this->getTable('user'), 44 $this->getTable('user'),
43 ['user_id'], 45 ['user_id'],
44 ['id'], 46 ['id'],
45 ['onDelete' => 'CASCADE'] 47 ['onDelete' => 'CASCADE'],
48 $this->constraintName
46 ); 49 );
47 } 50 }
48 51
@@ -51,5 +54,14 @@ class Version20161024212538 extends AbstractMigration implements ContainerAwareI
51 */ 54 */
52 public function down(Schema $schema) 55 public function down(Schema $schema)
53 { 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 }
54 } 66 }
55} 67}
diff --git a/app/DoctrineMigrations/Version20161106113822.php b/app/DoctrineMigrations/Version20161106113822.php
index faa2d9fd..de3702a4 100644
--- a/app/DoctrineMigrations/Version20161106113822.php
+++ b/app/DoctrineMigrations/Version20161106113822.php
@@ -48,6 +48,9 @@ class Version20161106113822 extends AbstractMigration implements ContainerAwareI
48 public function down(Schema $schema) 48 public function down(Schema $schema)
49 { 49 {
50 $configTable = $schema->getTable($this->getTable('config')); 50 $configTable = $schema->getTable($this->getTable('config'));
51 $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');
52 } 55 }
53} 56}
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/en/user/upgrade.rst b/docs/en/user/upgrade.rst
index ff8b85ee..b3972bce 100644
--- a/docs/en/user/upgrade.rst
+++ b/docs/en/user/upgrade.rst
@@ -1,3 +1,4 @@
1==================================
1Upgrade your wallabag installation 2Upgrade your wallabag installation
2================================== 3==================================
3 4
@@ -7,18 +8,19 @@ You will find here different ways to upgrade your wallabag:
7- `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>`_
8- `from 1.x to 2.x <#from-wallabag-1-x>`_ 9- `from 1.x to 2.x <#from-wallabag-1-x>`_
9 10
11*****************************
10Upgrading from 2.1.x to 2.2.x 12Upgrading from 2.1.x to 2.2.x
11----------------------------- 13*****************************
12 14
13Upgrade on a dedicated web server 15Upgrade on a dedicated web server
14^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 16=================================
15 17
16:: 18::
17 19
18 make update 20 make update
19 21
20Explanations about database migrations 22Explanations about database migrations
21"""""""""""""""""""""""""""""""""""""" 23--------------------------------------
22 24
23During the update, we execute database migrations. 25During the update, we execute database migrations.
24 26
@@ -44,7 +46,7 @@ Here is the migrations list for 2.1.x to 2.2.0 release:
44* ``20161214094403``: added ``uid`` index on ``entry`` table 46* ``20161214094403``: added ``uid`` index on ``entry`` table
45 47
46Upgrade on a shared hosting 48Upgrade on a shared hosting
47^^^^^^^^^^^^^^^^^^^^^^^^^^^ 49===========================
48 50
49Backup your ``app/config/parameters.yml`` file. 51Backup your ``app/config/parameters.yml`` file.
50 52
@@ -64,20 +66,818 @@ If you use SQLite, you must also copy your ``data/`` folder inside the new insta
64 66
65Empty ``var/cache`` folder. 67Empty ``var/cache`` folder.
66 68
67You 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: 69You 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.
70
71You may encounter issues with indexes names: if so, please change queries with the correct index name.
72
73Migration 20161001072726
74------------------------
75
76MySQL
77^^^^^
78
79Migration up
80""""""""""""
81
82.. code-block:: sql
83
84 ALTER TABLE wallabag_entry_tag DROP FOREIGN KEY FK_C9F0DD7CBA364942
85 ALTER TABLE wallabag_entry_tag DROP FOREIGN KEY FK_C9F0DD7CBAD26311
86 ALTER TABLE wallabag_entry_tag ADD CONSTRAINT FK_entry_tag_entry FOREIGN KEY (entry_id) REFERENCES wallabag_entry (id) ON DELETE CASCADE
87 ALTER TABLE wallabag_entry_tag ADD CONSTRAINT FK_entry_tag_tag FOREIGN KEY (tag_id) REFERENCES wallabag_tag (id) ON DELETE CASCADE
88 ALTER TABLE wallabag_annotation DROP FOREIGN KEY FK_A7AED006BA364942
89 ALTER TABLE wallabag_annotation ADD CONSTRAINT FK_annotation_entry FOREIGN KEY (entry_id) REFERENCES wallabag_entry (id) ON DELETE CASCADE
90
91Migration down
92""""""""""""""
93
94We didn't write down migration for ``20161001072726``.
95
96PostgreSQL
97^^^^^^^^^^
98
99Migration up
100""""""""""""
101
102.. code-block:: sql
103
104 ALTER TABLE wallabag_entry_tag DROP CONSTRAINT fk_c9f0dd7cba364942
105 ALTER TABLE wallabag_entry_tag DROP CONSTRAINT fk_c9f0dd7cbad26311
106 ALTER TABLE wallabag_entry_tag ADD CONSTRAINT FK_entry_tag_entry FOREIGN KEY (entry_id) REFERENCES wallabag_entry (id) ON DELETE CASCADE
107 ALTER TABLE wallabag_entry_tag ADD CONSTRAINT FK_entry_tag_tag FOREIGN KEY (tag_id) REFERENCES wallabag_tag (id) ON DELETE CASCADE
108 ALTER TABLE wallabag_annotation DROP CONSTRAINT fk_a7aed006ba364942
109 ALTER TABLE wallabag_annotation ADD CONSTRAINT FK_annotation_entry FOREIGN KEY (entry_id) REFERENCES wallabag_entry (id) ON DELETE CASCADE
110
111Migration down
112""""""""""""""
113
114We didn't write down migration for ``20161001072726``.
115
116SQLite
117^^^^^^
118
119This migration can only be executed safely on MySQL or PostgreSQL.
120
121Migration 20161022134138
122------------------------
123
124MySQL
125^^^^^
126
127Migration up
128""""""""""""
129
130.. code-block:: sql
131
132 ALTER DATABASE wallabag CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci;
133 ALTER TABLE wallabag_user CHANGE confirmation_token confirmation_token VARCHAR(180) DEFAULT NULL;
134 ALTER TABLE wallabag_user CHANGE salt salt VARCHAR(180) NOT NULL;
135 ALTER TABLE wallabag_user CHANGE password password VARCHAR(180) NOT NULL;
136 ALTER TABLE wallabag_annotation CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
137 ALTER TABLE wallabag_entry CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
138 ALTER TABLE wallabag_tag CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
139 ALTER TABLE wallabag_user CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
140 ALTER TABLE wallabag_annotation CHANGE `text` `text` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
141 ALTER TABLE wallabag_annotation CHANGE `quote` `quote` VARCHAR(191) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
142 ALTER TABLE wallabag_entry CHANGE `title` `title` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
143 ALTER TABLE wallabag_entry CHANGE `content` `content` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
144 ALTER TABLE wallabag_tag CHANGE `label` `label` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
145 ALTER TABLE wallabag_user CHANGE `name` `name` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
146
147Migration down
148""""""""""""""
149
150.. code-block:: sql
151
152 ALTER DATABASE wallabag CHARACTER SET = utf8 COLLATE = utf8_unicode_ci;
153 ALTER TABLE wallabag_annotation CONVERT TO CHARACTER SET utf8 COLLATE utf8_unicode_ci;
154 ALTER TABLE wallabag_entry CONVERT TO CHARACTER SET utf8 COLLATE utf8_unicode_ci;
155 ALTER TABLE wallabag_tag CONVERT TO CHARACTER SET utf8 COLLATE utf8_unicode_ci;
156 ALTER TABLE wallabag_user CONVERT TO CHARACTER SET utf8 COLLATE utf8_unicode_ci;
157 ALTER TABLE wallabag_annotation CHANGE `text` `text` longtext CHARACTER SET utf8 COLLATE utf8_unicode_ci;
158 ALTER TABLE wallabag_annotation CHANGE `quote` `quote` VARCHAR(255) CHARACTER SET utf8 COLLATE utf8_unicode_ci;
159 ALTER TABLE wallabag_entry CHANGE `title` `title` longtext CHARACTER SET utf8 COLLATE utf8_unicode_ci;
160 ALTER TABLE wallabag_entry CHANGE `content` `content` longtext CHARACTER SET utf8 COLLATE utf8_unicode_ci;
161 ALTER TABLE wallabag_tag CHANGE `label` `label` longtext CHARACTER SET utf8 COLLATE utf8_unicode_ci;
162 ALTER TABLE wallabag_user CHANGE `name` `name` longtext CHARACTER SET utf8 COLLATE utf8_unicode_ci;
163
164PostgreSQL and SQLite
165^^^^^^^^^^^^^^^^^^^^^
166
167This migration only apply to MySQL.
168
169Migration 20161024212538
170------------------------
171
172MySQL
173^^^^^
174
175Migration up
176""""""""""""
177
178.. code-block:: sql
179
180 ALTER TABLE wallabag_oauth2_clients ADD user_id INT NOT NULL
181 ALTER TABLE wallabag_oauth2_clients ADD CONSTRAINT IDX_user_oauth_client FOREIGN KEY (user_id) REFERENCES wallabag_user (id) ON DELETE CASCADE
182 CREATE INDEX IDX_635D765EA76ED395 ON wallabag_oauth2_clients (user_id)
183
184Migration down
185""""""""""""""
186
187.. code-block:: sql
188
189 ALTER TABLE wallabag_oauth2_clients DROP FOREIGN KEY IDX_user_oauth_client
190 ALTER TABLE wallabag_oauth2_clients DROP user_id
191
192PostgreSQL
193^^^^^^^^^^
194
195Migration up
196""""""""""""
197
198.. code-block:: sql
199
200 ALTER TABLE wallabag_oauth2_clients ADD user_id INT DEFAULT NULL
201 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
202 CREATE INDEX IDX_635D765EA76ED395 ON wallabag_oauth2_clients (user_id)
203
204
205Migration down
206""""""""""""""
207
208.. code-block:: sql
209
210 ALTER TABLE wallabag_oauth2_clients DROP CONSTRAINT idx_user_oauth_client
211 ALTER TABLE wallabag_oauth2_clients DROP user_id
212
213SQLite
214^^^^^^
215
216Migration up
217""""""""""""
218
219.. code-block:: sql
220
221 CREATE TEMPORARY TABLE __temp__wallabag_oauth2_clients AS SELECT id, random_id, redirect_uris, secret, allowed_grant_types, name FROM wallabag_oauth2_clients
222 DROP TABLE wallabag_oauth2_clients
223 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)
224 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
225 DROP TABLE __temp__wallabag_oauth2_clients
226 CREATE INDEX IDX_635D765EA76ED395 ON wallabag_oauth2_clients (user_id)
227
228Migration down
229""""""""""""""
230
231.. code-block:: sql
232
233 DROP INDEX IDX_635D765EA76ED395
234 CREATE TEMPORARY TABLE __temp__wallabag_oauth2_clients AS SELECT id, random_id, redirect_uris, secret, allowed_grant_types, name FROM wallabag_oauth2_clients
235 DROP TABLE wallabag_oauth2_clients
236 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))
237 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
238 DROP TABLE __temp__wallabag_oauth2_clients
239
240Migration 20161031132655
241------------------------
242
243MySQL
244^^^^^
245
246Migration up
247""""""""""""
248
249.. code-block:: sql
250
251 INSERT INTO wallabag_craue_config_setting (name, value, section) VALUES ('download_images_enabled', 0, 'misc')
252
253Migration down
254""""""""""""""
255
256.. code-block:: sql
257
258 DELETE FROM wallabag_craue_config_setting WHERE name = 'download_images_enabled';
259
260PostgreSQL
261^^^^^^^^^^
262
263Migration up
264""""""""""""
265
266.. code-block:: sql
267
268 INSERT INTO wallabag_craue_config_setting (name, value, section) VALUES ('download_images_enabled', 0, 'misc')
269
270Migration down
271""""""""""""""
272
273.. code-block:: sql
274
275 DELETE FROM wallabag_craue_config_setting WHERE name = 'download_images_enabled';
276
277SQLite
278^^^^^^
279
280Migration up
281""""""""""""
282
283.. code-block:: sql
284
285 INSERT INTO wallabag_craue_config_setting (name, value, section) VALUES ('download_images_enabled', 0, 'misc')
286
287Migration down
288""""""""""""""
289
290.. code-block:: sql
291
292 DELETE FROM wallabag_craue_config_setting WHERE name = 'download_images_enabled';
293
294Migration 20161104073720
295------------------------
296
297MySQL
298^^^^^
299
300Migration up
301""""""""""""
302
303.. code-block:: sql
304
305 CREATE INDEX IDX_entry_created_at ON wallabag_entry (created_at)
306
307Migration down
308""""""""""""""
309
310.. code-block:: sql
311
312 DROP INDEX IDX_entry_created_at ON wallabag_entry
313
314PostgreSQL
315^^^^^^^^^^
316
317Migration up
318""""""""""""
319
320.. code-block:: sql
321
322 CREATE INDEX IDX_entry_created_at ON wallabag_entry (created_at)
323
324Migration down
325""""""""""""""
326
327.. code-block:: sql
328
329 DROP INDEX idx_entry_created_at
330
331SQLite
332^^^^^^
333
334Migration up
335""""""""""""
336
337.. code-block:: sql
338
339 DROP INDEX created_at_idx
340 DROP INDEX IDX_F4D18282A76ED395
341 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
342 DROP TABLE wallabag_entry
343 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))
344 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
345 DROP TABLE __temp__wallabag_entry
346 CREATE INDEX created_at_idx ON wallabag_entry (created_at)
347 CREATE INDEX IDX_F4D18282A76ED395 ON wallabag_entry (user_id)
348 CREATE INDEX IDX_entry_created_at ON wallabag_entry (created_at)
349
350Migration down
351""""""""""""""
352
353.. code-block:: sql
354
355 DROP INDEX IDX_entry_created_at
356 DROP INDEX IDX_F4D18282A76ED395
357 DROP INDEX created_at_idx
358 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
359 DROP TABLE wallabag_entry
360 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))
361 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
362 DROP TABLE __temp__wallabag_entry
363 CREATE INDEX IDX_F4D18282A76ED395 ON wallabag_entry (user_id)
364 CREATE INDEX created_at_idx ON wallabag_entry (created_at)
365
366Migration 20161106113822
367------------------------
368
369MySQL
370^^^^^
371
372Migration up
373""""""""""""
374
375.. code-block:: sql
376
377 ALTER TABLE wallabag_config ADD action_mark_as_read INT DEFAULT 0
378
379Migration down
380""""""""""""""
381
382.. code-block:: sql
383
384 ALTER TABLE wallabag_config DROP action_mark_as_read
385
386PostgreSQL
387^^^^^^^^^^
388
389Migration up
390""""""""""""
391
392.. code-block:: sql
393
394 ALTER TABLE wallabag_config ADD action_mark_as_read INT DEFAULT 0
395
396Migration down
397""""""""""""""
398
399.. code-block:: sql
400
401 ALTER TABLE wallabag_config DROP action_mark_as_read
402
403SQLite
404^^^^^^
405
406Migration up
407""""""""""""
408
409.. code-block:: sql
410
411 ALTER TABLE wallabag_config ADD COLUMN action_mark_as_read INTEGER DEFAULT 0
412
413Migration down
414""""""""""""""
415
416.. code-block:: sql
417
418 DROP INDEX UNIQ_87E64C53A76ED395
419 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
420 DROP TABLE wallabag_config
421 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))
422 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
423 DROP TABLE __temp__wallabag_config
424 CREATE UNIQUE INDEX UNIQ_87E64C53A76ED395 ON wallabag_config (user_id)
425
426Migration 20161117071626
427------------------------
428
429MySQL
430^^^^^
431
432Migration up
433""""""""""""
68 434
69.. code-block:: sql 435.. code-block:: sql
70 436
437 INSERT INTO wallabag_craue_config_setting (name, value, section) VALUES ('share_unmark', 0, 'entry')
438 INSERT INTO wallabag_craue_config_setting (name, value, section) VALUES ('unmark_url', 'https://unmark.it', 'entry')
439
440Migration down
441""""""""""""""
442
443.. code-block:: sql
444
445 DELETE FROM wallabag_craue_config_setting WHERE name = 'share_unmark';
446 DELETE FROM wallabag_craue_config_setting WHERE name = 'unmark_url';
447
448PostgreSQL
449^^^^^^^^^^
450
451Migration up
452""""""""""""
453
454.. code-block:: sql
455
456 INSERT INTO wallabag_craue_config_setting (name, value, section) VALUES ('share_unmark', 0, 'entry')
457 INSERT INTO wallabag_craue_config_setting (name, value, section) VALUES ('unmark_url', 'https://unmark.it', 'entry')
458
459Migration down
460""""""""""""""
461
462.. code-block:: sql
463
464 DELETE FROM wallabag_craue_config_setting WHERE name = 'share_unmark';
465 DELETE FROM wallabag_craue_config_setting WHERE name = 'unmark_url';
466
467SQLite
468^^^^^^
469
470Migration up
471""""""""""""
472
473.. code-block:: sql
474
475 INSERT INTO wallabag_craue_config_setting (name, value, section) VALUES ('share_unmark', 0, 'entry')
476 INSERT INTO wallabag_craue_config_setting (name, value, section) VALUES ('unmark_url', 'https://unmark.it', 'entry')
477
478Migration down
479""""""""""""""
480
481.. code-block:: sql
482
483 DELETE FROM wallabag_craue_config_setting WHERE name = 'share_unmark';
484 DELETE FROM wallabag_craue_config_setting WHERE name = 'unmark_url';
485
486Migration 20161118134328
487------------------------
488
489MySQL
490^^^^^
491
492Migration up
493""""""""""""
494
495.. code-block:: sql
496
497 ALTER TABLE wallabag_entry ADD http_status VARCHAR(3) DEFAULT NULL
498
499Migration down
500""""""""""""""
501
502.. code-block:: sql
503
504 ALTER TABLE wallabag_entry DROP http_status
505
506PostgreSQL
507^^^^^^^^^^
508
509Migration up
510""""""""""""
511
512.. code-block:: sql
513
514 ALTER TABLE wallabag_entry ADD http_status VARCHAR(3) DEFAULT NULL
515
516Migration down
517""""""""""""""
518
519.. code-block:: sql
520
521 ALTER TABLE wallabag_entry DROP http_status
522
523SQLite
524^^^^^^
525
526Migration up
527""""""""""""
528
529.. code-block:: sql
530
531 ALTER TABLE wallabag_entry ADD COLUMN http_status VARCHAR(3) DEFAULT NULL
532
533Migration down
534""""""""""""""
535
536.. code-block:: sql
537
538 DROP INDEX created_at_idx
539 DROP INDEX IDX_F4D18282A76ED395
540 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
541 DROP TABLE wallabag_entry
542 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))
543 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
544 DROP TABLE __temp__wallabag_entry
545 CREATE INDEX created_at_idx ON wallabag_entry (created_at)
546 CREATE INDEX IDX_F4D18282A76ED395 ON wallabag_entry (user_id)
547
548Migration 20161122144743
549------------------------
550
551MySQL
552^^^^^
553
554Migration up
555""""""""""""
556
557.. code-block:: sql
558
559 INSERT INTO wallabag_craue_config_setting (name, value, section) VALUES ('restricted_access', 0, 'entry')
560
561Migration down
562""""""""""""""
563
564.. code-block:: sql
565
566 DELETE FROM wallabag_craue_config_setting WHERE name = 'restricted_access';
567
568PostgreSQL
569^^^^^^^^^^
570
571Migration up
572""""""""""""
573
574.. code-block:: sql
575
576 INSERT INTO wallabag_craue_config_setting (name, value, section) VALUES ('restricted_access', 0, 'entry')
577
578Migration down
579""""""""""""""
580
581.. code-block:: sql
582
583 DELETE FROM wallabag_craue_config_setting WHERE name = 'restricted_access';
584
585SQLite
586^^^^^^
587
588Migration up
589""""""""""""
590
591.. code-block:: sql
592
593 INSERT INTO wallabag_craue_config_setting (name, value, section) VALUES ('restricted_access', 0, 'entry')
594
595Migration down
596""""""""""""""
597
598.. code-block:: sql
599
600 DELETE FROM wallabag_craue_config_setting WHERE name = 'restricted_access';
601
602Migration 20161122203647
603------------------------
604
605MySQL
606^^^^^
607
608Migration up
609""""""""""""
610
611.. code-block:: sql
612
613 ALTER TABLE wallabag_user DROP expired, DROP credentials_expired
614
615Migration down
616""""""""""""""
617
618.. code-block:: sql
619
620 ALTER TABLE wallabag_user ADD expired SMALLINT DEFAULT NULL, ADD credentials_expired SMALLINT DEFAULT NULL
621
622PostgreSQL
623^^^^^^^^^^
624
625Migration up
626""""""""""""
627
628.. code-block:: sql
629
630 ALTER TABLE wallabag_user DROP expired
631 ALTER TABLE wallabag_user DROP credentials_expired
632
633Migration down
634""""""""""""""
635
636.. code-block:: sql
637
638 ALTER TABLE wallabag_user ADD expired SMALLINT DEFAULT NULL
639 ALTER TABLE wallabag_user ADD credentials_expired SMALLINT DEFAULT NULL
640
641SQLite
642^^^^^^
643
644Migration up
645""""""""""""
646
647.. code-block:: sql
648
649 DROP INDEX UNIQ_1D63E7E5C05FB297
650 DROP INDEX UNIQ_1D63E7E5A0D96FBF
651 DROP INDEX UNIQ_1D63E7E592FC23A8
652 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
653 DROP TABLE wallabag_user
654 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))
655 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
656 DROP TABLE __temp__wallabag_user
657 CREATE UNIQUE INDEX UNIQ_1D63E7E5C05FB297 ON wallabag_user (confirmation_token)
658 CREATE UNIQUE INDEX UNIQ_1D63E7E5A0D96FBF ON wallabag_user (email_canonical)
659 CREATE UNIQUE INDEX UNIQ_1D63E7E592FC23A8 ON wallabag_user (username_canonical)
660
661Migration down
662""""""""""""""
663
664.. code-block:: sql
665
666 ALTER TABLE wallabag_user ADD COLUMN expired SMALLINT DEFAULT NULL
667 ALTER TABLE wallabag_user ADD COLUMN credentials_expired SMALLINT DEFAULT NULL
668
669Migration 20161128084725
670------------------------
671
672MySQL
673^^^^^
674
675Migration up
676""""""""""""
677
678.. code-block:: sql
679
680 ALTER TABLE wallabag_config ADD list_mode INT DEFAULT NULL
681
682Migration down
683""""""""""""""
684
685.. code-block:: sql
686
687 ALTER TABLE wallabag_config DROP list_mode
688
689PostgreSQL
690^^^^^^^^^^
691
692Migration up
693""""""""""""
694
695.. code-block:: sql
696
697 ALTER TABLE wallabag_config ADD list_mode INT DEFAULT NULL
698
699Migration down
700""""""""""""""
701
702.. code-block:: sql
703
704 ALTER TABLE wallabag_config DROP list_mode
705
706SQLite
707^^^^^^
708
709Migration up
710""""""""""""
711
712.. code-block:: sql
713
714 ALTER TABLE wallabag_config ADD COLUMN list_mode INTEGER DEFAULT NULL
715
716Migration down
717""""""""""""""
718
719.. code-block:: sql
720
721 DROP INDEX UNIQ_87E64C53A76ED395
722 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
723 DROP TABLE wallabag_config
724 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))
725 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
726 DROP TABLE __temp__wallabag_config
727 CREATE UNIQUE INDEX UNIQ_87E64C53A76ED395 ON wallabag_config (user_id)
728
729Migration 20161128131503
730------------------------
731
732MySQL
733^^^^^
734
735Migration up
736""""""""""""
737
738.. code-block:: sql
739
740 ALTER TABLE wallabag_user DROP locked, DROP credentials_expire_at, DROP expires_at
741
742Migration down
743""""""""""""""
744
745.. code-block:: sql
746
747 ALTER TABLE wallabag_user ADD locked SMALLINT DEFAULT NULL, ADD credentials_expire_at DATETIME DEFAULT NULL, ADD expires_at DATETIME DEFAULT NULL
748
749PostgreSQL
750^^^^^^^^^^
751
752Migration up
753""""""""""""
754
755.. code-block:: sql
756
757 ALTER TABLE wallabag_user DROP locked
758 ALTER TABLE wallabag_user DROP credentials_expire_at
759 ALTER TABLE wallabag_user DROP expires_at
760
761Migration down
762""""""""""""""
763
764.. code-block:: sql
765
766 ALTER TABLE wallabag_user ADD locked SMALLINT DEFAULT NULL
767 ALTER TABLE wallabag_user ADD credentials_expire_at TIMESTAMP(0) WITHOUT TIME ZONE DEFAULT NULL
768 ALTER TABLE wallabag_user ADD expires_at TIMESTAMP(0) WITHOUT TIME ZONE DEFAULT NULL
769
770SQLite
771^^^^^^
772
773Migration up
774""""""""""""
775
776.. code-block:: sql
777
778 ALTER TABLE wallabag_user ADD COLUMN locked SMALLINT DEFAULT NULL
779 ALTER TABLE wallabag_user ADD COLUMN credentials_expire_at DATETIME DEFAULT NULL
780 ALTER TABLE wallabag_user ADD COLUMN expires_at DATETIME DEFAULT NULL
781
782Migration down
783""""""""""""""
784
785.. code-block:: sql
786
787 DROP INDEX UNIQ_1D63E7E592FC23A8
788 DROP INDEX UNIQ_1D63E7E5A0D96FBF
789 DROP INDEX UNIQ_1D63E7E5C05FB297
790 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
791 DROP TABLE wallabag_user
792 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))
793 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
794 DROP TABLE __temp__wallabag_user
795 CREATE UNIQUE INDEX UNIQ_1D63E7E592FC23A8 ON wallabag_user (username_canonical)
796 CREATE UNIQUE INDEX UNIQ_1D63E7E5A0D96FBF ON wallabag_user (email_canonical)
797 CREATE UNIQUE INDEX UNIQ_1D63E7E5C05FB297 ON wallabag_user (confirmation_token)
798
799Migration 20161214094403
800------------------------
801
802MySQL
803^^^^^
804
805Migration up
806""""""""""""
807
808.. code-block:: sql
809
810 CREATE INDEX IDX_entry_uid ON wallabag_entry (uid)
811
812Migration down
813""""""""""""""
814
815.. code-block:: sql
816
817 DROP INDEX IDX_entry_uid ON wallabag_entry
818
819PostgreSQL
820^^^^^^^^^^
821
822Migration up
823""""""""""""
824
825.. code-block:: sql
826
827 CREATE INDEX IDX_entry_uid ON wallabag_entry (uid)
828
829Migration down
830""""""""""""""
831
832.. code-block:: sql
833
834 DROP INDEX idx_entry_uid
835
836SQLite
837^^^^^^
838
839Migration up
840""""""""""""
841
842.. code-block:: sql
843
844 DROP INDEX IDX_F4D18282A76ED395
845 DROP INDEX created_at_idx
846 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
847 DROP TABLE wallabag_entry
848 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))
849 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
850 DROP TABLE __temp__wallabag_entry
851 CREATE INDEX IDX_F4D18282A76ED395 ON wallabag_entry (user_id)
852 CREATE INDEX created_at_idx ON wallabag_entry (created_at)
853 CREATE INDEX IDX_entry_uid ON wallabag_entry (uid)
854
855Migration down
856""""""""""""""
857
858.. code-block:: sql
71 859
860 DROP INDEX IDX_entry_uid
861 DROP INDEX created_at_idx
862 DROP INDEX IDX_F4D18282A76ED395
863 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
864 DROP TABLE wallabag_entry
865 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))
866 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
867 DROP TABLE __temp__wallabag_entry
868 CREATE INDEX created_at_idx ON wallabag_entry (created_at)
869 CREATE INDEX IDX_F4D18282A76ED395 ON wallabag_entry (user_id)
870
871***************************
72Upgrade from 2.0.x to 2.1.1 872Upgrade from 2.0.x to 2.1.1
73--------------------------- 873***************************
74 874
75.. warning:: 875.. warning::
76 876
77 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. 877 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.
78 878
79Upgrade on a dedicated web server 879Upgrade on a dedicated web server
80^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 880=================================
81 881
82:: 882::
83 883
@@ -90,7 +890,7 @@ Upgrade on a dedicated web server
90 php bin/console cache:clear --env=prod 890 php bin/console cache:clear --env=prod
91 891
92Upgrade on a shared hosting 892Upgrade on a shared hosting
93^^^^^^^^^^^^^^^^^^^^^^^^^^^ 893===========================
94 894
95Backup your ``app/config/parameters.yml`` file. 895Backup your ``app/config/parameters.yml`` file.
96 896
@@ -122,8 +922,9 @@ You must run some SQL queries to upgrade your database. We assume that the table
122 ALTER TABLE `wallabag_config` ADD `pocket_consumer_key` VARCHAR(255) DEFAULT NULL; 922 ALTER TABLE `wallabag_config` ADD `pocket_consumer_key` VARCHAR(255) DEFAULT NULL;
123 DELETE FROM `wallabag_craue_config_setting` WHERE `name` = 'pocket_consumer_key'; 923 DELETE FROM `wallabag_craue_config_setting` WHERE `name` = 'pocket_consumer_key';
124 924
925*****************
125From wallabag 1.x 926From wallabag 1.x
126----------------- 927*****************
127 928
128There is no automatic script to update from wallabag 1.x to wallabag 2.x. You need to: 929There is no automatic script to update from wallabag 1.x to wallabag 2.x. You need to:
129 930