diff --git a/resources/sql.qrc b/resources/sql.qrc index 371636d3c..d3c892fb5 100755 --- a/resources/sql.qrc +++ b/resources/sql.qrc @@ -24,5 +24,6 @@ sql/db_update_sqlite_8_9.sql sql/db_update_sqlite_9_10.sql sql/db_update_sqlite_10_11.sql + sql/db_update_sqlite_11_12.sql \ No newline at end of file diff --git a/resources/sql/db_init_mysql.sql b/resources/sql/db_init_mysql.sql index df98dda73..202a60970 100644 --- a/resources/sql/db_init_mysql.sql +++ b/resources/sql/db_init_mysql.sql @@ -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, diff --git a/resources/sql/db_init_sqlite.sql b/resources/sql/db_init_sqlite.sql index b8b87952c..cfaf5cf01 100644 --- a/resources/sql/db_init_sqlite.sql +++ b/resources/sql/db_init_sqlite.sql @@ -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, diff --git a/resources/sql/db_update_mysql_11_12.sql b/resources/sql/db_update_mysql_11_12.sql index 98f39b94d..5948efd97 100644 --- a/resources/sql/db_update_mysql_11_12.sql +++ b/resources/sql/db_update_mysql_11_12.sql @@ -1,3 +1,4 @@ ALTER TABLE Feeds -MODIFY url VARCHAR(1000); --- ! \ No newline at end of file +MODIFY url VARCHAR(1000); +-- ! +UPDATE Information SET inf_value = '12' WHERE inf_key = 'schema_version'; \ No newline at end of file diff --git a/resources/sql/db_update_sqlite_11_12.sql b/resources/sql/db_update_sqlite_11_12.sql new file mode 100755 index 000000000..d535ac102 --- /dev/null +++ b/resources/sql/db_update_sqlite_11_12.sql @@ -0,0 +1 @@ +UPDATE Information SET inf_value = '12' WHERE inf_key = 'schema_version'; \ No newline at end of file diff --git a/resources/text/CHANGELOG b/resources/text/CHANGELOG index d6558f245..6276b8f6a 100644 --- a/resources/text/CHANGELOG +++ b/resources/text/CHANGELOG @@ -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. diff --git a/src/librssguard/definitions/definitions.h b/src/librssguard/definitions/definitions.h index 9146bac84..a7a02383e 100755 --- a/src/librssguard/definitions/definitions.h +++ b/src/librssguard/definitions/definitions.h @@ -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 "##" diff --git a/src/librssguard/miscellaneous/databasefactory.cpp b/src/librssguard/miscellaneous/databasefactory.cpp index d0ea5a3de..07888ee98 100644 --- a/src/librssguard/miscellaneous/databasefactory.cpp +++ b/src/librssguard/miscellaneous/databasefactory.cpp @@ -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); } }