diff --git a/resources/sql.qrc b/resources/sql.qrc
index dfde11c96..a400fa231 100755
--- a/resources/sql.qrc
+++ b/resources/sql.qrc
@@ -16,6 +16,7 @@
sql/db_update_mysql_13_14.sql
sql/db_update_mysql_14_15.sql
sql/db_update_mysql_15_16.sql
+ sql/db_update_mysql_16_17.sql
sql/db_init_sqlite.sql
sql/db_update_sqlite_1_2.sql
@@ -33,5 +34,6 @@
sql/db_update_sqlite_13_14.sql
sql/db_update_sqlite_14_15.sql
sql/db_update_sqlite_15_16.sql
+ sql/db_update_sqlite_16_17.sql
\ No newline at end of file
diff --git a/resources/sql/db_init_mysql.sql b/resources/sql/db_init_mysql.sql
index 81196628d..8ee01bd49 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', '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,
diff --git a/resources/sql/db_init_sqlite.sql b/resources/sql/db_init_sqlite.sql
index de46eaeca..b9e283516 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', '16');
+INSERT INTO Information VALUES (1, 'schema_version', '17');
-- !
CREATE TABLE IF NOT EXISTS Accounts (
id INTEGER PRIMARY KEY,
diff --git a/resources/sql/db_update_mysql_16_17.sql b/resources/sql/db_update_mysql_16_17.sql
new file mode 100644
index 000000000..7891d47a8
--- /dev/null
+++ b/resources/sql/db_update_mysql_16_17.sql
@@ -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';
\ No newline at end of file
diff --git a/resources/sql/db_update_sqlite_16_17.sql b/resources/sql/db_update_sqlite_16_17.sql
new file mode 100644
index 000000000..c9f299b9c
--- /dev/null
+++ b/resources/sql/db_update_sqlite_16_17.sql
@@ -0,0 +1 @@
+UPDATE Information SET inf_value = '17' WHERE inf_key = 'schema_version';
\ No newline at end of file
diff --git a/resources/text/CHANGELOG b/resources/text/CHANGELOG
index 1965401ff..087b63594 100644
--- a/resources/text/CHANGELOG
+++ b/resources/text/CHANGELOG
@@ -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
—————
diff --git a/src/librssguard/definitions/definitions.h b/src/librssguard/definitions/definitions.h
index 6d33304b0..7cba5e9a9 100755
--- a/src/librssguard/definitions/definitions.h
+++ b/src/librssguard/definitions/definitions.h
@@ -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 "##"
diff --git a/src/librssguard/services/abstract/rootitem.cpp b/src/librssguard/services/abstract/rootitem.cpp
index 61e91d641..49bcdfaff 100644
--- a/src/librssguard/services/abstract/rootitem.cpp
+++ b/src/librssguard/services/abstract/rootitem.cpp
@@ -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());