diff --git a/resources/misc/db_init_sqlite.sql b/resources/misc/db_init_sqlite.sql index 497a0d995..8d5881df1 100644 --- a/resources/misc/db_init_sqlite.sql +++ b/resources/misc/db_init_sqlite.sql @@ -63,6 +63,7 @@ CREATE TABLE IF NOT EXISTS Messages ( date_created INTEGER NOT NULL CHECK (date_created != 0), contents TEXT, is_pdeleted INTEGER(1) NOT NULL DEFAULT 0 CHECK (is_pdeleted >= 0 AND is_pdeleted <= 1), + enclosures TEXT, FOREIGN KEY (feed) REFERENCES Feeds (id) ); @@ -77,4 +78,4 @@ INSERT INTO Feeds (title, description, date_created, category, encoding, url, pr -- ! INSERT INTO Feeds (title, description, date_created, category, encoding, url, protected, update_type, type) VALUES ('LXer: Linux News', 'The world is talking about GNU/Linux and Free/Open Source Software.', 1388678961000, 1, 'UTF-8', 'http://lxer.com/module/newswire/headlines.rss', 0, 1, 2); -- ! -INSERT INTO Feeds (title, description, date_created, category, encoding, url, protected, update_type, update_interval, type) VALUES ('Recent Commits', 'Recent commits for RSS Guard project.', 1388678961000, 2, 'UTF-8', 'http://bitbucket.org/skunkos/rssguard/rss', 0, 2, 30, 1); \ No newline at end of file +INSERT INTO Feeds (title, description, date_created, category, encoding, url, protected, update_type, update_interval, type) VALUES ('Recent Commits', 'Recent commits for RSS Guard project.', 1388678961000, 2, 'UTF-8', 'http://bitbucket.org/skunkos/rssguard/rss', 0, 2, 30, 1); diff --git a/resources/misc/db_init_sqlite_memory.sql b/resources/misc/db_init_sqlite_memory.sql index 3fcabe681..36870fc99 100644 --- a/resources/misc/db_init_sqlite_memory.sql +++ b/resources/misc/db_init_sqlite_memory.sql @@ -63,6 +63,7 @@ CREATE TABLE IF NOT EXISTS Messages ( date_created INTEGER NOT NULL CHECK (date_created != 0), contents TEXT, is_pdeleted INTEGER(1) NOT NULL DEFAULT 0 CHECK (is_pdeleted >= 0 AND is_pdeleted <= 1), + enclosures TEXT, FOREIGN KEY (feed) REFERENCES Feeds (id) -); \ No newline at end of file +); diff --git a/resources/misc/db_update_mysql_2_3.sql b/resources/misc/db_update_mysql_2_3.sql new file mode 100644 index 000000000..3c6f614b7 --- /dev/null +++ b/resources/misc/db_update_mysql_2_3.sql @@ -0,0 +1,4 @@ +ALTER TABLE Messages +ADD COLUMN enclosures TEXT; +-- ! +UPDATE Information SET inf_value = '3' WHERE inf_key = 'schema_version'; diff --git a/resources/misc/db_update_sqlite_2_3.sql b/resources/misc/db_update_sqlite_2_3.sql new file mode 100644 index 000000000..3c6f614b7 --- /dev/null +++ b/resources/misc/db_update_sqlite_2_3.sql @@ -0,0 +1,4 @@ +ALTER TABLE Messages +ADD COLUMN enclosures TEXT; +-- ! +UPDATE Information SET inf_value = '3' WHERE inf_key = 'schema_version'; diff --git a/src/core/messagesmodel.cpp b/src/core/messagesmodel.cpp index 4981d4d77..9b3009ba1 100755 --- a/src/core/messagesmodel.cpp +++ b/src/core/messagesmodel.cpp @@ -146,7 +146,8 @@ void MessagesModel::setupHeaderData() { /*: Tooltip for author of message.*/ tr("Author") << /*: Tooltip for creation date of message.*/ tr("Created on") << /*: Tooltip for contents of message.*/ tr("Contents") << - /*: Tooltip for "pdeleted" column in msg list.*/ tr("Permanently deleted"); + /*: Tooltip for "pdeleted" column in msg list.*/ tr("Permanently deleted") << + /*: Tooltip for attachments of message.*/ tr("Attachments"); m_tooltipData << tr("Id of the message.") << tr("Is message read?") << tr("Is message deleted?") << tr("Is message important?") << diff --git a/src/definitions/definitions.h.in b/src/definitions/definitions.h.in index 1c1590983..768746cff 100755 --- a/src/definitions/definitions.h.in +++ b/src/definitions/definitions.h.in @@ -100,7 +100,7 @@ #define APP_DB_SQLITE_FILE "database.db" // Keep this in sync with schema versions declared in SQL initialization code. -#define APP_DB_SCHEMA_VERSION "2" +#define APP_DB_SCHEMA_VERSION "3" #define APP_DB_UPDATE_FILE_PATTERN "db_update_%1_%2_%3.sql" #define APP_DB_COMMENT_SPLIT "-- !\n" #define APP_DB_WEB_PATH "data/database/web"