aboutsummaryrefslogtreecommitdiffhomepage
path: root/docs/en/user/query-upgrade-21-22.rst
diff options
context:
space:
mode:
authorNicolas LÅ“uillet <nicolas@loeuillet.org>2017-01-27 14:46:50 +0100
committerGitHub <noreply@github.com>2017-01-27 14:46:50 +0100
commitf0c5154d68108e5ec829ee9346fb20b702d9444f (patch)
treefa5a32d4f73cb2740a871230d9685bbeb50f269d /docs/en/user/query-upgrade-21-22.rst
parent6fb06904ecde15b1b07d0a2af945338b416cf0e2 (diff)
parent01e760691b72b3c3e63ac79a18da2c8efad42558 (diff)
downloadwallabag-f0c5154d68108e5ec829ee9346fb20b702d9444f.tar.gz
wallabag-f0c5154d68108e5ec829ee9346fb20b702d9444f.tar.zst
wallabag-f0c5154d68108e5ec829ee9346fb20b702d9444f.zip
Merge pull request #2789 from wallabag/add-index-starred-archived
Added indexes on is_archived and is_starred
Diffstat (limited to 'docs/en/user/query-upgrade-21-22.rst')
-rw-r--r--docs/en/user/query-upgrade-21-22.rst82
1 files changed, 82 insertions, 0 deletions
diff --git a/docs/en/user/query-upgrade-21-22.rst b/docs/en/user/query-upgrade-21-22.rst
index cd201dc2..f32d5a19 100644
--- a/docs/en/user/query-upgrade-21-22.rst
+++ b/docs/en/user/query-upgrade-21-22.rst
@@ -795,3 +795,85 @@ Migration down
795 DROP TABLE __temp__wallabag_entry 795 DROP TABLE __temp__wallabag_entry
796 CREATE INDEX created_at_idx ON wallabag_entry (created_at) 796 CREATE INDEX created_at_idx ON wallabag_entry (created_at)
797 CREATE INDEX IDX_F4D18282A76ED395 ON wallabag_entry (user_id) 797 CREATE INDEX IDX_F4D18282A76ED395 ON wallabag_entry (user_id)
798
799Migration 20170127093841
800------------------------
801
802MySQL
803^^^^^
804
805Migration up
806""""""""""""
807
808.. code-block:: sql
809
810 CREATE INDEX IDX_entry_starred ON wallabag_entry (is_starred)
811 CREATE INDEX IDX_entry_archived ON wallabag_entry (is_archived)
812
813Migration down
814""""""""""""""
815
816.. code-block:: sql
817
818 DROP INDEX IDX_entry_starred ON wallabag_entry
819 DROP INDEX IDX_entry_archived ON wallabag_entry
820
821PostgreSQL
822^^^^^^^^^^
823
824Migration up
825""""""""""""
826
827.. code-block:: sql
828
829 CREATE INDEX IDX_entry_starred ON wallabag_entry (is_starred)
830 CREATE INDEX IDX_entry_archived ON wallabag_entry (is_archived)
831
832Migration down
833""""""""""""""
834
835.. code-block:: sql
836
837 DROP INDEX IDX_entry_starred
838 DROP INDEX IDX_entry_archived
839
840SQLite
841^^^^^^
842
843Migration up
844""""""""""""
845
846.. code-block:: sql
847
848 DROP INDEX uid
849 DROP INDEX created_at
850 DROP INDEX IDX_F4D18282A76ED395
851 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, http_status FROM wallabag_entry
852 DROP TABLE wallabag_entry
853 CREATE TABLE wallabag_entry (id INTEGER NOT NULL, user_id INTEGER DEFAULT NULL, uid VARCHAR(23) 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', http_status VARCHAR(3) DEFAULT NULL COLLATE BINARY, PRIMARY KEY(id))
854 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, http_status) 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, http_status FROM __temp__wallabag_entry
855 DROP TABLE __temp__wallabag_entry
856 CREATE INDEX uid ON wallabag_entry (uid)
857 CREATE INDEX created_at ON wallabag_entry (created_at)
858 CREATE INDEX IDX_F4D18282A76ED395 ON wallabag_entry (user_id)
859 CREATE INDEX IDX_entry_starred ON wallabag_entry (is_starred)
860 CREATE INDEX IDX_entry_archived ON wallabag_entry (is_archived)
861
862Migration down
863""""""""""""""
864
865.. code-block:: sql
866
867 DROP INDEX IDX_entry_archived
868 DROP INDEX IDX_entry_starred
869 DROP INDEX IDX_F4D18282A76ED395
870 DROP INDEX created_at
871 DROP INDEX uid
872 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, http_status FROM wallabag_entry
873 DROP TABLE wallabag_entry
874 CREATE TABLE wallabag_entry (id INTEGER NOT NULL, user_id INTEGER DEFAULT NULL, uid VARCHAR(23) 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', http_status VARCHAR(3) DEFAULT NULL COLLATE BINARY, PRIMARY KEY(id))
875 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, http_status) 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, http_status FROM __temp__wallabag_entry
876 DROP TABLE __temp__wallabag_entry
877 CREATE INDEX IDX_F4D18282A76ED395 ON wallabag_entry (user_id)
878 CREATE INDEX created_at ON wallabag_entry (created_at)
879 CREATE INDEX uid ON wallabag_entry (uid)