mirror of
https://github.com/martinrotter/rssguard.git
synced 2025-01-29 00:30:12 +01:00
Fix SQL error which made labels and message filters unusable when using MySQL. Also fixed bug in importing initial set of feeds for standard plugin.
This commit is contained in:
parent
46cef375bd
commit
0a79d07e01
@ -16,6 +16,7 @@
|
||||
<file>sql/db_update_mysql_13_14.sql</file>
|
||||
<file>sql/db_update_mysql_14_15.sql</file>
|
||||
<file>sql/db_update_mysql_15_16.sql</file>
|
||||
<file>sql/db_update_mysql_16_17.sql</file>
|
||||
|
||||
<file>sql/db_init_sqlite.sql</file>
|
||||
<file>sql/db_update_sqlite_1_2.sql</file>
|
||||
@ -33,5 +34,6 @@
|
||||
<file>sql/db_update_sqlite_13_14.sql</file>
|
||||
<file>sql/db_update_sqlite_14_15.sql</file>
|
||||
<file>sql/db_update_sqlite_15_16.sql</file>
|
||||
<file>sql/db_update_sqlite_16_17.sql</file>
|
||||
</qresource>
|
||||
</RCC>
|
@ -12,7 +12,7 @@ CREATE TABLE IF NOT EXISTS Information (
|
||||
inf_value TEXT NOT NULL
|
||||
);
|
||||
-- !
|
||||
INSERT INTO Information VALUES (1, 'schema_version', '16');
|
||||
INSERT INTO Information VALUES (1, 'schema_version', '17');
|
||||
-- !
|
||||
CREATE TABLE IF NOT EXISTS Accounts (
|
||||
id INTEGER PRIMARY KEY,
|
||||
@ -130,7 +130,7 @@ CREATE TABLE IF NOT EXISTS Messages (
|
||||
);
|
||||
-- !
|
||||
CREATE TABLE IF NOT EXISTS MessageFilters (
|
||||
id INTEGER PRIMARY KEY,
|
||||
id INTEGER AUTO_INCREMENT PRIMARY KEY,
|
||||
name TEXT NOT NULL CHECK (name != ''),
|
||||
script TEXT NOT NULL CHECK (script != '')
|
||||
);
|
||||
@ -145,7 +145,7 @@ CREATE TABLE IF NOT EXISTS MessageFiltersInFeeds (
|
||||
);
|
||||
-- !
|
||||
CREATE TABLE IF NOT EXISTS Labels (
|
||||
id INTEGER PRIMARY KEY,
|
||||
id INTEGER AUTO_INCREMENT PRIMARY KEY,
|
||||
name TEXT NOT NULL CHECK (name != ''),
|
||||
color VARCHAR(7),
|
||||
custom_id TEXT,
|
||||
|
@ -6,7 +6,7 @@ CREATE TABLE IF NOT EXISTS Information (
|
||||
inf_value TEXT NOT NULL
|
||||
);
|
||||
-- !
|
||||
INSERT INTO Information VALUES (1, 'schema_version', '16');
|
||||
INSERT INTO Information VALUES (1, 'schema_version', '17');
|
||||
-- !
|
||||
CREATE TABLE IF NOT EXISTS Accounts (
|
||||
id INTEGER PRIMARY KEY,
|
||||
|
9
resources/sql/db_update_mysql_16_17.sql
Normal file
9
resources/sql/db_update_mysql_16_17.sql
Normal file
@ -0,0 +1,9 @@
|
||||
SET FOREIGN_KEY_CHECKS = 0;
|
||||
-- !
|
||||
ALTER TABLE Labels MODIFY id INTEGER AUTO_INCREMENT;
|
||||
-- !
|
||||
ALTER TABLE MessageFilters MODIFY id INTEGER AUTO_INCREMENT;
|
||||
-- !
|
||||
SET FOREIGN_KEY_CHECKS = 1;
|
||||
-- !
|
||||
UPDATE Information SET inf_value = '17' WHERE inf_key = 'schema_version';
|
1
resources/sql/db_update_sqlite_16_17.sql
Normal file
1
resources/sql/db_update_sqlite_16_17.sql
Normal file
@ -0,0 +1 @@
|
||||
UPDATE Information SET inf_value = '17' WHERE inf_key = 'schema_version';
|
@ -1,3 +1,12 @@
|
||||
3.8.0
|
||||
—————
|
||||
|
||||
Added:
|
||||
▪
|
||||
|
||||
Fixed/changed:
|
||||
▪ Big thanks to ttrss.info for providing Tiny Tiny RSS account for testing.
|
||||
|
||||
3.7.2
|
||||
—————
|
||||
|
||||
|
@ -136,7 +136,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 "16"
|
||||
#define APP_DB_SCHEMA_VERSION "17"
|
||||
#define APP_DB_UPDATE_FILE_PATTERN "db_update_%1_%2_%3.sql"
|
||||
#define APP_DB_COMMENT_SPLIT "-- !\n"
|
||||
#define APP_DB_NAME_PLACEHOLDER "##"
|
||||
|
@ -22,7 +22,11 @@ RootItem::RootItem(const RootItem& other) : RootItem(nullptr) {
|
||||
setId(other.id());
|
||||
setCustomId(other.customId());
|
||||
setIcon(other.icon());
|
||||
setChildItems(other.childItems());
|
||||
|
||||
// NOTE: We do not need to clone childs, because that would mean that
|
||||
// either source or target item tree would get corrupted.
|
||||
//setChildItems(other.childItems());
|
||||
|
||||
setParent(other.parent());
|
||||
setCreationDate(other.creationDate());
|
||||
setDescription(other.description());
|
||||
|
Loading…
x
Reference in New Issue
Block a user