Added enclosures column for DB layer.
This commit is contained in:
parent
d88bce20cf
commit
4656a43cfb
@ -63,6 +63,7 @@ CREATE TABLE IF NOT EXISTS Messages (
|
|||||||
date_created INTEGER NOT NULL CHECK (date_created != 0),
|
date_created INTEGER NOT NULL CHECK (date_created != 0),
|
||||||
contents TEXT,
|
contents TEXT,
|
||||||
is_pdeleted INTEGER(1) NOT NULL DEFAULT 0 CHECK (is_pdeleted >= 0 AND is_pdeleted <= 1),
|
is_pdeleted INTEGER(1) NOT NULL DEFAULT 0 CHECK (is_pdeleted >= 0 AND is_pdeleted <= 1),
|
||||||
|
enclosures TEXT,
|
||||||
|
|
||||||
FOREIGN KEY (feed) REFERENCES Feeds (id)
|
FOREIGN KEY (feed) REFERENCES Feeds (id)
|
||||||
);
|
);
|
||||||
|
@ -63,6 +63,7 @@ CREATE TABLE IF NOT EXISTS Messages (
|
|||||||
date_created INTEGER NOT NULL CHECK (date_created != 0),
|
date_created INTEGER NOT NULL CHECK (date_created != 0),
|
||||||
contents TEXT,
|
contents TEXT,
|
||||||
is_pdeleted INTEGER(1) NOT NULL DEFAULT 0 CHECK (is_pdeleted >= 0 AND is_pdeleted <= 1),
|
is_pdeleted INTEGER(1) NOT NULL DEFAULT 0 CHECK (is_pdeleted >= 0 AND is_pdeleted <= 1),
|
||||||
|
enclosures TEXT,
|
||||||
|
|
||||||
FOREIGN KEY (feed) REFERENCES Feeds (id)
|
FOREIGN KEY (feed) REFERENCES Feeds (id)
|
||||||
);
|
);
|
4
resources/misc/db_update_mysql_2_3.sql
Normal file
4
resources/misc/db_update_mysql_2_3.sql
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
ALTER TABLE Messages
|
||||||
|
ADD COLUMN enclosures TEXT;
|
||||||
|
-- !
|
||||||
|
UPDATE Information SET inf_value = '3' WHERE inf_key = 'schema_version';
|
4
resources/misc/db_update_sqlite_2_3.sql
Normal file
4
resources/misc/db_update_sqlite_2_3.sql
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
ALTER TABLE Messages
|
||||||
|
ADD COLUMN enclosures TEXT;
|
||||||
|
-- !
|
||||||
|
UPDATE Information SET inf_value = '3' WHERE inf_key = 'schema_version';
|
@ -146,7 +146,8 @@ void MessagesModel::setupHeaderData() {
|
|||||||
/*: Tooltip for author of message.*/ tr("Author") <<
|
/*: Tooltip for author of message.*/ tr("Author") <<
|
||||||
/*: Tooltip for creation date of message.*/ tr("Created on") <<
|
/*: Tooltip for creation date of message.*/ tr("Created on") <<
|
||||||
/*: Tooltip for contents of message.*/ tr("Contents") <<
|
/*: 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?") <<
|
m_tooltipData << tr("Id of the message.") << tr("Is message read?") <<
|
||||||
tr("Is message deleted?") << tr("Is message important?") <<
|
tr("Is message deleted?") << tr("Is message important?") <<
|
||||||
|
@ -100,7 +100,7 @@
|
|||||||
#define APP_DB_SQLITE_FILE "database.db"
|
#define APP_DB_SQLITE_FILE "database.db"
|
||||||
|
|
||||||
// Keep this in sync with schema versions declared in SQL initialization code.
|
// 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_UPDATE_FILE_PATTERN "db_update_%1_%2_%3.sql"
|
||||||
#define APP_DB_COMMENT_SPLIT "-- !\n"
|
#define APP_DB_COMMENT_SPLIT "-- !\n"
|
||||||
#define APP_DB_WEB_PATH "data/database/web"
|
#define APP_DB_WEB_PATH "data/database/web"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user