mirror of
https://github.com/wallabag/wallabag.git
synced 2025-07-22 17:18:37 +00:00
Added indexes on is_archived and is_starred
This commit is contained in:
parent
6fb06904ec
commit
b564d350b0
7 changed files with 316 additions and 0 deletions
|
@ -795,3 +795,85 @@ Migration down
|
|||
DROP TABLE __temp__wallabag_entry
|
||||
CREATE INDEX created_at_idx ON wallabag_entry (created_at)
|
||||
CREATE INDEX IDX_F4D18282A76ED395 ON wallabag_entry (user_id)
|
||||
|
||||
Migration 20170127093841
|
||||
------------------------
|
||||
|
||||
MySQL
|
||||
^^^^^
|
||||
|
||||
Migration up
|
||||
""""""""""""
|
||||
|
||||
.. code-block:: sql
|
||||
|
||||
CREATE INDEX IDX_entry_starred ON wallabag_entry (is_starred)
|
||||
CREATE INDEX IDX_entry_archived ON wallabag_entry (is_archived)
|
||||
|
||||
Migration down
|
||||
""""""""""""""
|
||||
|
||||
.. code-block:: sql
|
||||
|
||||
DROP INDEX IDX_entry_starred ON wallabag_entry
|
||||
DROP INDEX IDX_entry_archived ON wallabag_entry
|
||||
|
||||
PostgreSQL
|
||||
^^^^^^^^^^
|
||||
|
||||
Migration up
|
||||
""""""""""""
|
||||
|
||||
.. code-block:: sql
|
||||
|
||||
CREATE INDEX IDX_entry_starred ON wallabag_entry (is_starred)
|
||||
CREATE INDEX IDX_entry_archived ON wallabag_entry (is_archived)
|
||||
|
||||
Migration down
|
||||
""""""""""""""
|
||||
|
||||
.. code-block:: sql
|
||||
|
||||
DROP INDEX IDX_entry_starred
|
||||
DROP INDEX IDX_entry_archived
|
||||
|
||||
SQLite
|
||||
^^^^^^
|
||||
|
||||
Migration up
|
||||
""""""""""""
|
||||
|
||||
.. code-block:: sql
|
||||
|
||||
DROP INDEX uid
|
||||
DROP INDEX created_at
|
||||
DROP INDEX IDX_F4D18282A76ED395
|
||||
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
|
||||
DROP TABLE wallabag_entry
|
||||
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))
|
||||
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
|
||||
DROP TABLE __temp__wallabag_entry
|
||||
CREATE INDEX uid ON wallabag_entry (uid)
|
||||
CREATE INDEX created_at ON wallabag_entry (created_at)
|
||||
CREATE INDEX IDX_F4D18282A76ED395 ON wallabag_entry (user_id)
|
||||
CREATE INDEX IDX_entry_starred ON wallabag_entry (is_starred)
|
||||
CREATE INDEX IDX_entry_archived ON wallabag_entry (is_archived)
|
||||
|
||||
Migration down
|
||||
""""""""""""""
|
||||
|
||||
.. code-block:: sql
|
||||
|
||||
DROP INDEX IDX_entry_archived
|
||||
DROP INDEX IDX_entry_starred
|
||||
DROP INDEX IDX_F4D18282A76ED395
|
||||
DROP INDEX created_at
|
||||
DROP INDEX uid
|
||||
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
|
||||
DROP TABLE wallabag_entry
|
||||
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))
|
||||
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
|
||||
DROP TABLE __temp__wallabag_entry
|
||||
CREATE INDEX IDX_F4D18282A76ED395 ON wallabag_entry (user_id)
|
||||
CREATE INDEX created_at ON wallabag_entry (created_at)
|
||||
CREATE INDEX uid ON wallabag_entry (uid)
|
||||
|
|
|
@ -37,6 +37,11 @@ Dies ist die Migrationsliste von 2.1.x auf 2.2.0:
|
|||
* ``20161118134328``: ``http_status``-Feld zur ``entry``-Tabelle hinzugefügt
|
||||
* ``20161122144743``: Interne Einstellung für das (de-)aktivieren zum Holen von Artikeln mit einer Paywall hinzugefügt
|
||||
* ``20161122203647``: ``expired``- und ``credentials_expired``-Feld aus der ``user``-Tabelle entfernt
|
||||
* ``20161128084725``: added ``list_mode`` field on ``config`` table
|
||||
* ``20161128131503``: dropped ``locked``, ``credentials_expire_at`` and ``expires_at`` fields on ``user`` table
|
||||
* ``20161214094402``: renamed ``uuid`` to ``uid`` on ``entry`` table
|
||||
* ``20161214094403``: added ``uid`` index on ``entry`` table
|
||||
* ``20170127093841``: added ``is_starred`` and ``is_archived`` indexes on ``entry`` table
|
||||
|
||||
Upgrade auf einem Shared Hosting
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue