Fixed feed.url problem with length in mysql storage.

This commit is contained in:
Martin Rotter 2020-04-30 12:07:19 +02:00
parent 9368a46331
commit 81eeff052d
8 changed files with 10 additions and 7 deletions

View File

@ -24,5 +24,6 @@
<file>sql/db_update_sqlite_8_9.sql</file>
<file>sql/db_update_sqlite_9_10.sql</file>
<file>sql/db_update_sqlite_10_11.sql</file>
<file>sql/db_update_sqlite_11_12.sql</file>
</qresource>
</RCC>

View File

@ -12,7 +12,7 @@ CREATE TABLE IF NOT EXISTS Information (
inf_value TEXT NOT NULL
);
-- !
INSERT INTO Information VALUES (1, 'schema_version', '11');
INSERT INTO Information VALUES (1, 'schema_version', '12');
-- !
CREATE TABLE IF NOT EXISTS Accounts (
id INTEGER PRIMARY KEY,
@ -92,7 +92,7 @@ CREATE TABLE IF NOT EXISTS Feeds (
icon BLOB,
category INTEGER NOT NULL CHECK (category >= -1),
encoding TEXT,
url VARCHAR(100),
url VARCHAR(1000),
protected INTEGER(1) NOT NULL CHECK (protected >= 0 AND protected <= 1),
username TEXT,
password TEXT,

View File

@ -6,7 +6,7 @@ CREATE TABLE IF NOT EXISTS Information (
inf_value TEXT NOT NULL
);
-- !
INSERT INTO Information VALUES (1, 'schema_version', '11');
INSERT INTO Information VALUES (1, 'schema_version', '12');
-- !
CREATE TABLE IF NOT EXISTS Accounts (
id INTEGER PRIMARY KEY,

View File

@ -1,3 +1,4 @@
ALTER TABLE Feeds
MODIFY url VARCHAR(1000);
-- !
MODIFY url VARCHAR(1000);
-- !
UPDATE Information SET inf_value = '12' WHERE inf_key = 'schema_version';

View File

@ -0,0 +1 @@
UPDATE Information SET inf_value = '12' WHERE inf_key = 'schema_version';

View File

@ -13,6 +13,7 @@ Added:
▪ QtWebEngine-based RSS Guard variant now should respect web proxy set in settings.
Fixed/changed:
▪ Feeds.url attribute in MySQL storage now has <=1000 length.
▪ Message viewer now responds to "zoom" action via mouse wheel + CTRL key and
persistently saves the zoom level fixing the problem with small text in HIDPI
screens.

View File

@ -113,7 +113,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 "11"
#define APP_DB_SCHEMA_VERSION "12"
#define APP_DB_UPDATE_FILE_PATTERN "db_update_%1_%2_%3.sql"
#define APP_DB_COMMENT_SPLIT "-- !\n"
#define APP_DB_NAME_PLACEHOLDER "##"

View File

@ -462,7 +462,6 @@ QSqlDatabase DatabaseFactory::connection(const QString& connection_name, Desired
case UsedDriver::SQLITE:
case UsedDriver::SQLITE_MEMORY:
default:
return sqliteConnection(connection_name, desired_type);
}
}