aboutsummaryrefslogtreecommitdiffhomepage
path: root/docs/en/user/query-upgrade-21-22.rst
diff options
context:
space:
mode:
Diffstat (limited to 'docs/en/user/query-upgrade-21-22.rst')
-rw-r--r--docs/en/user/query-upgrade-21-22.rst105
1 files changed, 105 insertions, 0 deletions
diff --git a/docs/en/user/query-upgrade-21-22.rst b/docs/en/user/query-upgrade-21-22.rst
index f32d5a19..fa9835a8 100644
--- a/docs/en/user/query-upgrade-21-22.rst
+++ b/docs/en/user/query-upgrade-21-22.rst
@@ -724,6 +724,111 @@ Migration down
724 CREATE UNIQUE INDEX UNIQ_1D63E7E5A0D96FBF ON wallabag_user (email_canonical) 724 CREATE UNIQUE INDEX UNIQ_1D63E7E5A0D96FBF ON wallabag_user (email_canonical)
725 CREATE UNIQUE INDEX UNIQ_1D63E7E5C05FB297 ON wallabag_user (confirmation_token) 725 CREATE UNIQUE INDEX UNIQ_1D63E7E5C05FB297 ON wallabag_user (confirmation_token)
726 726
727Migration 20161214094402
728------------------------
729
730MySQL
731^^^^^
732
733Migration up
734""""""""""""
735
736.. code-block:: sql
737
738 ALTER TABLE wallabag_entry CHANGE uuid uid VARCHAR(23)
739
740Migration down
741""""""""""""""
742
743.. code-block:: sql
744
745 ALTER TABLE wallabag_entry CHANGE uid uuid VARCHAR(23)
746
747PostgreSQL
748^^^^^^^^^^
749
750Migration up
751""""""""""""
752
753.. code-block:: sql
754
755 ALTER TABLE wallabag_entry RENAME uuid TO uid
756
757Migration down
758""""""""""""""
759
760.. code-block:: sql
761
762 ALTER TABLE wallabag_entry RENAME uid TO uuid
763
764SQLite
765^^^^^^
766
767Migration up
768""""""""""""
769
770.. code-block:: sql
771
772 CREATE TABLE __temp__wallabag_entry (
773 id INTEGER NOT NULL,
774 user_id INTEGER DEFAULT NULL,
775 uid VARCHAR(23) DEFAULT NULL,
776 title CLOB DEFAULT NULL,
777 url CLOB DEFAULT NULL,
778 is_archived BOOLEAN NOT NULL,
779 is_starred BOOLEAN NOT NULL,
780 content CLOB DEFAULT NULL,
781 created_at DATETIME NOT NULL,
782 updated_at DATETIME NOT NULL,
783 mimetype CLOB DEFAULT NULL,
784 language CLOB DEFAULT NULL,
785 reading_time INTEGER DEFAULT NULL,
786 domain_name CLOB DEFAULT NULL,
787 preview_picture CLOB DEFAULT NULL,
788 is_public BOOLEAN DEFAULT '0',
789 http_status VARCHAR(3) DEFAULT NULL,
790 PRIMARY KEY(id)
791 );
792 INSERT INTO __temp__wallabag_entry 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,http_status FROM wallabag_entry;
793 DROP TABLE wallabag_entry;
794 ALTER TABLE __temp__wallabag_entry RENAME TO wallabag_entry
795 CREATE INDEX uid ON wallabag_entry (uid)
796 CREATE INDEX created_at ON wallabag_entry (created_at)
797 CREATE INDEX IDX_F4D18282A76ED395 ON wallabag_entry (user_id)
798
799
800Migration down
801""""""""""""""
802
803.. code-block:: sql
804
805 CREATE TABLE __temp__wallabag_entry (
806 id INTEGER NOT NULL,
807 user_id INTEGER DEFAULT NULL,
808 uuid VARCHAR(23) DEFAULT NULL,
809 title CLOB DEFAULT NULL,
810 url CLOB DEFAULT NULL,
811 is_archived BOOLEAN NOT NULL,
812 is_starred BOOLEAN NOT NULL,
813 content CLOB DEFAULT NULL,
814 created_at DATETIME NOT NULL,
815 updated_at DATETIME NOT NULL,
816 mimetype CLOB DEFAULT NULL,
817 language CLOB DEFAULT NULL,
818 reading_time INTEGER DEFAULT NULL,
819 domain_name CLOB DEFAULT NULL,
820 preview_picture CLOB DEFAULT NULL,
821 is_public BOOLEAN DEFAULT '0',
822 http_status VARCHAR(3) DEFAULT NULL,
823 PRIMARY KEY(id)
824 );
825 INSERT INTO __temp__wallabag_entry 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;
826 DROP TABLE wallabag_entry;
827 ALTER TABLE __temp__wallabag_entry RENAME TO wallabag_entry
828 CREATE INDEX uid ON wallabag_entry (uid)
829 CREATE INDEX created_at ON wallabag_entry (created_at)
830 CREATE INDEX IDX_F4D18282A76ED395 ON wallabag_entry (user_id)
831
727Migration 20161214094403 832Migration 20161214094403
728------------------------ 833------------------------
729 834