Accepting request 570509 from KDE:Extra
OBS-URL: https://build.opensuse.org/request/show/570509 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/digikam?expand=0&rev=167
This commit is contained in:
commit
ca204d28a8
236
digikam-5.8.0.fix-db-migration-0001.patch
Normal file
236
digikam-5.8.0.fix-db-migration-0001.patch
Normal file
@ -0,0 +1,236 @@
|
||||
From 5893fde69518d70904d2b96e13800c7432b4e4c4 Mon Sep 17 00:00:00 2001
|
||||
From: Maik Qualmann <metzpinguin@gmail.com>
|
||||
Date: Mon, 15 Jan 2018 20:24:41 +0100
|
||||
Subject: fix schema update from V7/8 to V9 with temporary tables BUGS: 388977
|
||||
BUGS: 388867 BUGS: 388824 FIXED-IN: 5.9.0
|
||||
|
||||
---
|
||||
data/database/dbconfig.xml.cmake.in | 154 +++++++++++++++++++++++++++++-------
|
||||
2 files changed, 124 insertions(+), 30 deletions(-)
|
||||
|
||||
diff --git a/data/database/dbconfig.xml.cmake.in b/data/database/dbconfig.xml.cmake.in
|
||||
index a315361..2c5008f 100644
|
||||
--- a/data/database/dbconfig.xml.cmake.in
|
||||
+++ b/data/database/dbconfig.xml.cmake.in
|
||||
@@ -1992,8 +1992,6 @@
|
||||
END IF;
|
||||
END;
|
||||
</statement>
|
||||
- <statement mode="plain">SET SESSION OLD_ALTER_TABLE=1;</statement>
|
||||
- <statement mode="plain">SET SESSION FOREIGN_KEY_CHECKS=0;</statement>
|
||||
<statement mode="plain">DROP TRIGGER IF EXISTS delete_image;</statement>
|
||||
<statement mode="plain">DROP TRIGGER IF EXISTS delete_tag;</statement>
|
||||
<statement mode="plain">DROP TRIGGER IF EXISTS move_tagstree;</statement>
|
||||
@@ -2064,85 +2062,181 @@
|
||||
<statement mode="plain">ALTER TABLE TagProperties MODIFY COLUMN value LONGTEXT CHARACTER SET utf8 COLLATE utf8_general_ci;</statement>
|
||||
<statement mode="plain">ALTER TABLE ImageTagProperties MODIFY COLUMN property TEXT CHARACTER SET utf8 COLLATE utf8_general_ci;</statement>
|
||||
<statement mode="plain">ALTER TABLE ImageTagProperties MODIFY COLUMN value LONGTEXT CHARACTER SET utf8 COLLATE utf8_general_ci;</statement>
|
||||
- <statement mode="plain">ALTER IGNORE TABLE AlbumRoots
|
||||
+
|
||||
+ <statement mode="plain">RENAME TABLE AlbumRoots TO AlbumRoots_old;</statement>
|
||||
+ <statement mode="plain">CREATE TABLE AlbumRoots LIKE AlbumRoots_old;</statement>
|
||||
+ <statement mode="plain">ALTER TABLE AlbumRoots
|
||||
ADD UNIQUE (identifier(127), specificPath(128)),
|
||||
ENGINE InnoDB;</statement>
|
||||
- <statement mode="plain">ALTER IGNORE TABLE Albums
|
||||
+ <statement mode="plain">INSERT IGNORE INTO AlbumRoots SELECT * FROM AlbumRoots_old;</statement>
|
||||
+
|
||||
+ <statement mode="plain">RENAME TABLE Albums TO Albums_old;</statement>
|
||||
+ <statement mode="plain">CREATE TABLE Albums LIKE Albums_old;</statement>
|
||||
+ <statement mode="plain">ALTER TABLE Albums
|
||||
ADD CONSTRAINT Albums_AlbumRoots FOREIGN KEY (albumRoot) REFERENCES AlbumRoots (id) ON DELETE CASCADE ON UPDATE CASCADE,
|
||||
ADD UNIQUE (albumRoot, relativePath(255)),
|
||||
ENGINE InnoDB;</statement>
|
||||
- <statement mode="plain">ALTER IGNORE TABLE Images
|
||||
+ <statement mode="plain">INSERT IGNORE INTO Albums SELECT * FROM Albums_old;</statement>
|
||||
+ <statement mode="plain">UPDATE Albums SET icon = NULL WHERE icon = 0;</statement>
|
||||
+
|
||||
+ <statement mode="plain">RENAME TABLE Images TO Images_old;</statement>
|
||||
+ <statement mode="plain">CREATE TABLE Images LIKE Images_old;</statement>
|
||||
+ <statement mode="plain">ALTER TABLE Images
|
||||
ADD CONSTRAINT Images_Albums FOREIGN KEY (album) REFERENCES Albums (id) ON DELETE CASCADE ON UPDATE CASCADE,
|
||||
ADD UNIQUE (album, name(255)),
|
||||
ENGINE InnoDB;</statement>
|
||||
- <statement mode="plain">UPDATE Albums SET icon = NULL WHERE icon = 0;</statement>
|
||||
- <statement mode="plain">ALTER IGNORE TABLE Albums
|
||||
+ <statement mode="plain">INSERT IGNORE INTO Images SELECT * FROM Images_old;</statement>
|
||||
+
|
||||
+ <statement mode="plain">ALTER TABLE Albums
|
||||
ADD CONSTRAINT Albums_Images FOREIGN KEY (icon) REFERENCES Images (id) ON DELETE SET NULL ON UPDATE CASCADE;</statement>
|
||||
- <statement mode="plain">ALTER IGNORE TABLE ImageHaarMatrix
|
||||
+
|
||||
+ <statement mode="plain">RENAME TABLE ImageHaarMatrix TO ImageHaarMatrix_old;</statement>
|
||||
+ <statement mode="plain">CREATE TABLE ImageHaarMatrix LIKE ImageHaarMatrix_old;</statement>
|
||||
+ <statement mode="plain">ALTER TABLE ImageHaarMatrix
|
||||
ADD CONSTRAINT ImageHaarMatrix_Images FOREIGN KEY (imageid) REFERENCES Images (id) ON DELETE CASCADE ON UPDATE CASCADE,
|
||||
ENGINE InnoDB;</statement>
|
||||
- <statement mode="plain">ALTER IGNORE TABLE ImageInformation
|
||||
+ <statement mode="plain">INSERT IGNORE INTO ImageHaarMatrix SELECT * FROM ImageHaarMatrix_old;</statement>
|
||||
+
|
||||
+ <statement mode="plain">RENAME TABLE ImageInformation TO ImageInformation_old;</statement>
|
||||
+ <statement mode="plain">CREATE TABLE ImageInformation LIKE ImageInformation_old;</statement>
|
||||
+ <statement mode="plain">ALTER TABLE ImageInformation
|
||||
ADD CONSTRAINT ImageInformation_Images FOREIGN KEY (imageid) REFERENCES Images (id) ON DELETE CASCADE ON UPDATE CASCADE,
|
||||
ENGINE InnoDB;</statement>
|
||||
- <statement mode="plain">ALTER IGNORE TABLE ImageMetadata
|
||||
+ <statement mode="plain">INSERT IGNORE INTO ImageInformation SELECT * FROM ImageInformation_old;</statement>
|
||||
+
|
||||
+ <statement mode="plain">RENAME TABLE ImageMetadata TO ImageMetadata_old;</statement>
|
||||
+ <statement mode="plain">CREATE TABLE ImageMetadata LIKE ImageMetadata_old;</statement>
|
||||
+ <statement mode="plain">ALTER TABLE ImageMetadata
|
||||
ADD CONSTRAINT ImageMetadata_Images FOREIGN KEY (imageid) REFERENCES Images (id) ON DELETE CASCADE ON UPDATE CASCADE,
|
||||
ENGINE InnoDB;</statement>
|
||||
- <statement mode="plain">ALTER IGNORE TABLE VideoMetadata
|
||||
+ <statement mode="plain">INSERT IGNORE INTO ImageMetadata SELECT * FROM ImageMetadata_old;</statement>
|
||||
+
|
||||
+ <statement mode="plain">RENAME TABLE VideoMetadata TO VideoMetadata_old;</statement>
|
||||
+ <statement mode="plain">CREATE TABLE VideoMetadata LIKE VideoMetadata_old;</statement>
|
||||
+ <statement mode="plain">ALTER TABLE VideoMetadata
|
||||
ADD CONSTRAINT VideoMetadata_Images FOREIGN KEY (imageid) REFERENCES Images (id) ON DELETE CASCADE ON UPDATE CASCADE,
|
||||
ENGINE InnoDB;</statement>
|
||||
- <statement mode="plain">ALTER IGNORE TABLE ImagePositions
|
||||
+ <statement mode="plain">INSERT IGNORE INTO VideoMetadata SELECT * FROM VideoMetadata_old;</statement>
|
||||
+
|
||||
+ <statement mode="plain">RENAME TABLE ImagePositions TO ImagePositions_old;</statement>
|
||||
+ <statement mode="plain">CREATE TABLE ImagePositions LIKE ImagePositions_old;</statement>
|
||||
+ <statement mode="plain">ALTER TABLE ImagePositions
|
||||
ADD CONSTRAINT ImagePositions_Images FOREIGN KEY (imageid) REFERENCES Images (id) ON DELETE CASCADE ON UPDATE CASCADE,
|
||||
ENGINE InnoDB;</statement>
|
||||
- <statement mode="plain">ALTER IGNORE TABLE ImageComments
|
||||
+ <statement mode="plain">INSERT IGNORE INTO ImagePositions SELECT * FROM ImagePositions_old;</statement>
|
||||
+
|
||||
+ <statement mode="plain">RENAME TABLE ImageComments TO ImageComments_old;</statement>
|
||||
+ <statement mode="plain">CREATE TABLE ImageComments LIKE ImageComments_old;</statement>
|
||||
+ <statement mode="plain">ALTER TABLE ImageComments
|
||||
ADD CONSTRAINT ImageComments_Images FOREIGN KEY (imageid) REFERENCES Images (id) ON DELETE CASCADE ON UPDATE CASCADE,
|
||||
ADD UNIQUE(imageid, type, language, author(202)),
|
||||
ENGINE InnoDB;</statement>
|
||||
- <statement mode="plain">ALTER IGNORE TABLE ImageCopyright
|
||||
+ <statement mode="plain">INSERT IGNORE INTO ImageComments SELECT * FROM ImageComments_old;</statement>
|
||||
+
|
||||
+ <statement mode="plain">RENAME TABLE ImageCopyright TO ImageCopyright_old;</statement>
|
||||
+ <statement mode="plain">CREATE TABLE ImageCopyright LIKE ImageCopyright_old;</statement>
|
||||
+ <statement mode="plain">ALTER TABLE ImageCopyright
|
||||
ADD CONSTRAINT ImageCopyright_Images FOREIGN KEY (imageid) REFERENCES Images (id) ON DELETE CASCADE ON UPDATE CASCADE,
|
||||
ADD UNIQUE(imageid, property(110), value(111), extraValue(111)),
|
||||
ENGINE InnoDB;</statement>
|
||||
+ <statement mode="plain">INSERT IGNORE INTO ImageCopyright SELECT * FROM ImageCopyright_old;</statement>
|
||||
+
|
||||
+ <statement mode="plain">RENAME TABLE Tags TO Tags_old;</statement>
|
||||
+ <statement mode="plain">CREATE TABLE Tags LIKE Tags_old;</statement>
|
||||
+ <statement mode="plain">ALTER TABLE Tags
|
||||
+ ADD CONSTRAINT Tags_Images FOREIGN KEY (icon) REFERENCES Images (id) ON DELETE SET NULL ON UPDATE CASCADE,
|
||||
+ ADD UNIQUE(pid, name(100)),
|
||||
+ ENGINE InnoDB;</statement>
|
||||
+ <statement mode="plain">INSERT IGNORE INTO Tags SELECT * FROM Tags_old;</statement>
|
||||
<statement mode="plain">SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO';</statement>
|
||||
<statement mode="plain">REPLACE INTO Tags (id, pid, name, icon, iconkde, lft, rgt) VALUES (0, -1, '_Digikam_root_tag_', NULL, NULL,
|
||||
(SELECT MIN(tl.lft) FROM Tags AS tl),
|
||||
(SELECT MAX(tr.rgt) FROM Tags AS tr));</statement>
|
||||
<statement mode="plain">SET SQL_MODE=@OLD_SQL_MODE;</statement>
|
||||
- <statement mode="plain">UPDATE Tags set icon = NULL WHERE icon = 0;</statement>
|
||||
- <statement mode="plain">ALTER IGNORE TABLE Tags
|
||||
- ADD CONSTRAINT Tags_Images FOREIGN KEY (icon) REFERENCES Images (id) ON DELETE SET NULL ON UPDATE CASCADE,
|
||||
- ADD UNIQUE(pid, name(100)),
|
||||
- ENGINE InnoDB;</statement>
|
||||
- <statement mode="plain">ALTER IGNORE TABLE ImageTags
|
||||
+ <statement mode="plain">UPDATE Tags SET icon = NULL WHERE icon = 0;</statement>
|
||||
+
|
||||
+ <statement mode="plain">RENAME TABLE ImageTags TO ImageTags_old;</statement>
|
||||
+ <statement mode="plain">CREATE TABLE ImageTags LIKE ImageTags_old;</statement>
|
||||
+ <statement mode="plain">ALTER TABLE ImageTags
|
||||
ADD CONSTRAINT ImageTags_Images FOREIGN KEY (imageid) REFERENCES Images (id) ON DELETE CASCADE ON UPDATE CASCADE,
|
||||
ADD CONSTRAINT ImageTags_Tags FOREIGN KEY (tagid) REFERENCES Tags (id) ON DELETE CASCADE ON UPDATE CASCADE,
|
||||
ENGINE InnoDB;</statement>
|
||||
- <statement mode="plain">ALTER IGNORE TABLE ImageProperties
|
||||
+ <statement mode="plain">INSERT IGNORE INTO ImageTags SELECT * FROM ImageTags_old;</statement>
|
||||
+
|
||||
+ <statement mode="plain">RENAME TABLE ImageProperties TO ImageProperties_old;</statement>
|
||||
+ <statement mode="plain">CREATE TABLE ImageProperties LIKE ImageProperties_old;</statement>
|
||||
+ <statement mode="plain">ALTER TABLE ImageProperties
|
||||
ADD CONSTRAINT ImageProperties_Images FOREIGN KEY (imageid) REFERENCES Images (id) ON DELETE CASCADE ON UPDATE CASCADE,
|
||||
ADD UNIQUE (imageid, property(255)),
|
||||
ENGINE InnoDB;</statement>
|
||||
- <statement mode="plain">ALTER IGNORE TABLE Searches
|
||||
+ <statement mode="plain">INSERT IGNORE INTO ImageProperties SELECT * FROM ImageProperties_old;</statement>
|
||||
+
|
||||
+ <statement mode="plain">ALTER TABLE Searches
|
||||
ENGINE InnoDB;</statement>
|
||||
- <statement mode="plain">ALTER IGNORE TABLE DownloadHistory
|
||||
+
|
||||
+ <statement mode="plain">RENAME TABLE DownloadHistory TO DownloadHistory_old;</statement>
|
||||
+ <statement mode="plain">CREATE TABLE DownloadHistory LIKE DownloadHistory_old;</statement>
|
||||
+ <statement mode="plain">ALTER TABLE DownloadHistory
|
||||
ADD UNIQUE(identifier(164), filename(165), filesize, filedate),
|
||||
ENGINE InnoDB;</statement>
|
||||
- <statement mode="plain">ALTER IGNORE TABLE Settings
|
||||
+ <statement mode="plain">INSERT IGNORE INTO DownloadHistory SELECT * FROM DownloadHistory_old;</statement>
|
||||
+
|
||||
+ <statement mode="plain">RENAME TABLE Settings TO Settings_old;</statement>
|
||||
+ <statement mode="plain">CREATE TABLE Settings LIKE Settings_old;</statement>
|
||||
+ <statement mode="plain">ALTER TABLE Settings
|
||||
ADD UNIQUE(keyword(255)),
|
||||
ENGINE InnoDB;</statement>
|
||||
- <statement mode="plain">ALTER IGNORE TABLE ImageHistory
|
||||
+ <statement mode="plain">INSERT IGNORE INTO Settings SELECT * FROM Settings_old;</statement>
|
||||
+
|
||||
+ <statement mode="plain">RENAME TABLE ImageHistory TO ImageHistory_old;</statement>
|
||||
+ <statement mode="plain">CREATE TABLE ImageHistory LIKE ImageHistory_old;</statement>
|
||||
+ <statement mode="plain">ALTER TABLE ImageHistory
|
||||
ADD CONSTRAINT ImageHistory_Images FOREIGN KEY (imageid) REFERENCES Images (id) ON DELETE CASCADE ON UPDATE CASCADE,
|
||||
ENGINE InnoDB;</statement>
|
||||
- <statement mode="plain">ALTER IGNORE TABLE ImageRelations
|
||||
+ <statement mode="plain">INSERT IGNORE INTO ImageHistory SELECT * FROM ImageHistory_old;</statement>
|
||||
+
|
||||
+ <statement mode="plain">RENAME TABLE ImageRelations TO ImageRelations_old;</statement>
|
||||
+ <statement mode="plain">CREATE TABLE ImageRelations LIKE ImageRelations_old;</statement>
|
||||
+ <statement mode="plain">ALTER TABLE ImageRelations
|
||||
ADD CONSTRAINT ImageRelations_ImagesS FOREIGN KEY (subject) REFERENCES Images (id) ON DELETE CASCADE ON UPDATE CASCADE,
|
||||
ADD CONSTRAINT ImageRelations_ImagesO FOREIGN KEY (object) REFERENCES Images (id) ON DELETE CASCADE ON UPDATE CASCADE,
|
||||
ENGINE InnoDB;</statement>
|
||||
- <statement mode="plain">ALTER IGNORE TABLE TagProperties
|
||||
+ <statement mode="plain">INSERT IGNORE INTO ImageRelations SELECT * FROM ImageRelations_old;</statement>
|
||||
+
|
||||
+ <statement mode="plain">RENAME TABLE TagProperties TO TagProperties_old;</statement>
|
||||
+ <statement mode="plain">CREATE TABLE TagProperties LIKE TagProperties_old;</statement>
|
||||
+ <statement mode="plain">ALTER TABLE TagProperties
|
||||
ADD CONSTRAINT TagProperties_Tags FOREIGN KEY (tagid) REFERENCES Tags (id) ON DELETE CASCADE ON UPDATE CASCADE,
|
||||
ENGINE InnoDB;</statement>
|
||||
- <statement mode="plain">ALTER IGNORE TABLE ImageTagProperties
|
||||
+ <statement mode="plain">INSERT IGNORE INTO TagProperties SELECT * FROM TagProperties_old;</statement>
|
||||
+
|
||||
+ <statement mode="plain">RENAME TABLE ImageTagProperties TO ImageTagProperties_old;</statement>
|
||||
+ <statement mode="plain">CREATE TABLE ImageTagProperties LIKE ImageTagProperties_old;</statement>
|
||||
+ <statement mode="plain">ALTER TABLE ImageTagProperties
|
||||
ADD CONSTRAINT ImageTagProperties_Images FOREIGN KEY (imageid) REFERENCES Images (id) ON DELETE CASCADE ON UPDATE CASCADE,
|
||||
ADD CONSTRAINT ImageTagProperties_Tags FOREIGN KEY (tagid) REFERENCES Tags (id) ON DELETE CASCADE ON UPDATE CASCADE,
|
||||
ENGINE InnoDB;</statement>
|
||||
- <statement mode="plain">SET SESSION FOREIGN_KEY_CHECKS=1;</statement>
|
||||
- <statement mode="plain">SET SESSION OLD_ALTER_TABLE=0;</statement>
|
||||
+ <statement mode="plain">INSERT IGNORE INTO ImageTagProperties SELECT * FROM ImageTagProperties_old;</statement>
|
||||
+
|
||||
+ <statement mode="plain">DROP TABLE ImageTagProperties_old;</statement>
|
||||
+ <statement mode="plain">DROP TABLE TagProperties_old;</statement>
|
||||
+ <statement mode="plain">DROP TABLE ImageRelations_old;</statement>
|
||||
+ <statement mode="plain">DROP TABLE ImageHistory_old;</statement>
|
||||
+ <statement mode="plain">DROP TABLE Settings_old;</statement>
|
||||
+ <statement mode="plain">DROP TABLE DownloadHistory_old;</statement>
|
||||
+ <statement mode="plain">DROP TABLE ImageProperties_old;</statement>
|
||||
+ <statement mode="plain">DROP TABLE ImageTags_old;</statement>
|
||||
+ <statement mode="plain">DROP TABLE Tags_old;</statement>
|
||||
+ <statement mode="plain">DROP TABLE ImageCopyright_old;</statement>
|
||||
+ <statement mode="plain">DROP TABLE ImageComments_old;</statement>
|
||||
+ <statement mode="plain">DROP TABLE ImagePositions_old;</statement>
|
||||
+ <statement mode="plain">DROP TABLE VideoMetadata_old;</statement>
|
||||
+ <statement mode="plain">DROP TABLE ImageMetadata_old;</statement>
|
||||
+ <statement mode="plain">DROP TABLE ImageInformation_old;</statement>
|
||||
+ <statement mode="plain">DROP TABLE ImageHaarMatrix_old;</statement>
|
||||
+ <statement mode="plain">DROP TABLE Images_old;</statement>
|
||||
+ <statement mode="plain">DROP TABLE Albums_old;</statement>
|
||||
+ <statement mode="plain">DROP TABLE AlbumRoots_old;</statement>
|
||||
</dbaction>
|
||||
|
||||
<dbaction name="UpdateThumbnailsDBSchemaFromV1ToV2" mode="transaction">
|
||||
--
|
||||
cgit v0.11.2
|
||||
|
25
digikam-5.8.0.fix-db-migration-0002.patch
Normal file
25
digikam-5.8.0.fix-db-migration-0002.patch
Normal file
@ -0,0 +1,25 @@
|
||||
From 6c8398db5c57a550e7b14f48a0701b28f0eca840 Mon Sep 17 00:00:00 2001
|
||||
From: Maik Qualmann <metzpinguin@gmail.com>
|
||||
Date: Mon, 15 Jan 2018 22:57:11 +0100
|
||||
Subject: small fix for the schema update
|
||||
|
||||
---
|
||||
data/database/dbconfig.xml.cmake.in | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/data/database/dbconfig.xml.cmake.in b/data/database/dbconfig.xml.cmake.in
|
||||
index 2c5008f..a1cd69f 100644
|
||||
--- a/data/database/dbconfig.xml.cmake.in
|
||||
+++ b/data/database/dbconfig.xml.cmake.in
|
||||
@@ -2147,7 +2147,7 @@
|
||||
ADD CONSTRAINT Tags_Images FOREIGN KEY (icon) REFERENCES Images (id) ON DELETE SET NULL ON UPDATE CASCADE,
|
||||
ADD UNIQUE(pid, name(100)),
|
||||
ENGINE InnoDB;</statement>
|
||||
- <statement mode="plain">INSERT IGNORE INTO Tags SELECT * FROM Tags_old;</statement>
|
||||
+ <statement mode="plain">REPLACE INTO Tags SELECT * FROM Tags_old;</statement>
|
||||
<statement mode="plain">SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO';</statement>
|
||||
<statement mode="plain">REPLACE INTO Tags (id, pid, name, icon, iconkde, lft, rgt) VALUES (0, -1, '_Digikam_root_tag_', NULL, NULL,
|
||||
(SELECT MIN(tl.lft) FROM Tags AS tl),
|
||||
--
|
||||
cgit v0.11.2
|
||||
|
33
digikam-5.8.0.fix-db-migration-0003.patch
Normal file
33
digikam-5.8.0.fix-db-migration-0003.patch
Normal file
@ -0,0 +1,33 @@
|
||||
From 443ce0e848a0da4fa7c80dd5b077fb6b8a545126 Mon Sep 17 00:00:00 2001
|
||||
From: Maik Qualmann <metzpinguin@gmail.com>
|
||||
Date: Fri, 19 Jan 2018 07:07:08 +0100
|
||||
Subject: disable foreign key checks temporarily for the Tags table BUGS:
|
||||
388824
|
||||
|
||||
---
|
||||
data/database/dbconfig.xml.cmake.in | 2 ++
|
||||
1 file changed, 2 insertions(+)
|
||||
|
||||
diff --git a/data/database/dbconfig.xml.cmake.in b/data/database/dbconfig.xml.cmake.in
|
||||
index a1cd69f..a98434b 100644
|
||||
--- a/data/database/dbconfig.xml.cmake.in
|
||||
+++ b/data/database/dbconfig.xml.cmake.in
|
||||
@@ -2141,6 +2141,7 @@
|
||||
ENGINE InnoDB;</statement>
|
||||
<statement mode="plain">INSERT IGNORE INTO ImageCopyright SELECT * FROM ImageCopyright_old;</statement>
|
||||
|
||||
+ <statement mode="plain">SET FOREIGN_KEY_CHECKS=0;</statement>
|
||||
<statement mode="plain">RENAME TABLE Tags TO Tags_old;</statement>
|
||||
<statement mode="plain">CREATE TABLE Tags LIKE Tags_old;</statement>
|
||||
<statement mode="plain">ALTER TABLE Tags
|
||||
@@ -2154,6 +2155,7 @@
|
||||
(SELECT MAX(tr.rgt) FROM Tags AS tr));</statement>
|
||||
<statement mode="plain">SET SQL_MODE=@OLD_SQL_MODE;</statement>
|
||||
<statement mode="plain">UPDATE Tags SET icon = NULL WHERE icon = 0;</statement>
|
||||
+ <statement mode="plain">SET FOREIGN_KEY_CHECKS=1;</statement>
|
||||
|
||||
<statement mode="plain">RENAME TABLE ImageTags TO ImageTags_old;</statement>
|
||||
<statement mode="plain">CREATE TABLE ImageTags LIKE ImageTags_old;</statement>
|
||||
--
|
||||
cgit v0.11.2
|
||||
|
51
digikam-5.8.0.fix-db-migration-0004.patch
Normal file
51
digikam-5.8.0.fix-db-migration-0004.patch
Normal file
@ -0,0 +1,51 @@
|
||||
From ceb41a7f89ddf9716507466861828925357ab3f3 Mon Sep 17 00:00:00 2001
|
||||
From: Maik Qualmann <metzpinguin@gmail.com>
|
||||
Date: Fri, 19 Jan 2018 19:59:44 +0100
|
||||
Subject: drop old table if new run required
|
||||
|
||||
---
|
||||
data/database/dbconfig.xml.cmake.in | 21 +++++++++++++++++++++
|
||||
1 file changed, 21 insertions(+)
|
||||
|
||||
diff --git a/data/database/dbconfig.xml.cmake.in b/data/database/dbconfig.xml.cmake.in
|
||||
index a98434b..3ec790f 100644
|
||||
--- a/data/database/dbconfig.xml.cmake.in
|
||||
+++ b/data/database/dbconfig.xml.cmake.in
|
||||
@@ -2024,6 +2024,7 @@
|
||||
<statement mode="plain">CALL drop_foreign_key('TagProperties', 'TagProperties_Tags');</statement>
|
||||
<statement mode="plain">CALL drop_foreign_key('ImageTagProperties', 'ImageTagProperties_Images');</statement>
|
||||
<statement mode="plain">CALL drop_foreign_key('ImageTagProperties', 'ImageTagProperties_Tags');</statement>
|
||||
+
|
||||
<statement mode="plain">ALTER TABLE AlbumRoots MODIFY COLUMN label LONGTEXT CHARACTER SET utf8 COLLATE utf8_general_ci;</statement>
|
||||
<statement mode="plain">ALTER TABLE AlbumRoots MODIFY COLUMN identifier LONGTEXT CHARACTER SET utf8 COLLATE utf8_general_ci;</statement>
|
||||
<statement mode="plain">ALTER TABLE AlbumRoots MODIFY COLUMN specificPath LONGTEXT CHARACTER SET utf8 COLLATE utf8_general_ci;</statement>
|
||||
@@ -2063,6 +2064,26 @@
|
||||
<statement mode="plain">ALTER TABLE ImageTagProperties MODIFY COLUMN property TEXT CHARACTER SET utf8 COLLATE utf8_general_ci;</statement>
|
||||
<statement mode="plain">ALTER TABLE ImageTagProperties MODIFY COLUMN value LONGTEXT CHARACTER SET utf8 COLLATE utf8_general_ci;</statement>
|
||||
|
||||
+ <statement mode="plain">DROP TABLE IF EXISTS ImageTagProperties_old;</statement>
|
||||
+ <statement mode="plain">DROP TABLE IF EXISTS TagProperties_old;</statement>
|
||||
+ <statement mode="plain">DROP TABLE IF EXISTS ImageRelations_old;</statement>
|
||||
+ <statement mode="plain">DROP TABLE IF EXISTS ImageHistory_old;</statement>
|
||||
+ <statement mode="plain">DROP TABLE IF EXISTS Settings_old;</statement>
|
||||
+ <statement mode="plain">DROP TABLE IF EXISTS DownloadHistory_old;</statement>
|
||||
+ <statement mode="plain">DROP TABLE IF EXISTS ImageProperties_old;</statement>
|
||||
+ <statement mode="plain">DROP TABLE IF EXISTS ImageTags_old;</statement>
|
||||
+ <statement mode="plain">DROP TABLE IF EXISTS Tags_old;</statement>
|
||||
+ <statement mode="plain">DROP TABLE IF EXISTS ImageCopyright_old;</statement>
|
||||
+ <statement mode="plain">DROP TABLE IF EXISTS ImageComments_old;</statement>
|
||||
+ <statement mode="plain">DROP TABLE IF EXISTS ImagePositions_old;</statement>
|
||||
+ <statement mode="plain">DROP TABLE IF EXISTS VideoMetadata_old;</statement>
|
||||
+ <statement mode="plain">DROP TABLE IF EXISTS ImageMetadata_old;</statement>
|
||||
+ <statement mode="plain">DROP TABLE IF EXISTS ImageInformation_old;</statement>
|
||||
+ <statement mode="plain">DROP TABLE IF EXISTS ImageHaarMatrix_old;</statement>
|
||||
+ <statement mode="plain">DROP TABLE IF EXISTS Images_old;</statement>
|
||||
+ <statement mode="plain">DROP TABLE IF EXISTS Albums_old;</statement>
|
||||
+ <statement mode="plain">DROP TABLE IF EXISTS AlbumRoots_old;</statement>
|
||||
+
|
||||
<statement mode="plain">RENAME TABLE AlbumRoots TO AlbumRoots_old;</statement>
|
||||
<statement mode="plain">CREATE TABLE AlbumRoots LIKE AlbumRoots_old;</statement>
|
||||
<statement mode="plain">ALTER TABLE AlbumRoots
|
||||
--
|
||||
cgit v0.11.2
|
||||
|
@ -1,3 +1,12 @@
|
||||
-------------------------------------------------------------------
|
||||
Thu Jan 18 23:17:51 UTC 2018 - nico.kruber@gmail.com
|
||||
|
||||
- Add digikam-5.8.0.fix-db-migration-0001.patch (adapted to 5.8.0),
|
||||
digikam-5.8.0.fix-db-migration-0002.patch,
|
||||
digikam-5.8.0.fix-db-migration-0003.patch, and
|
||||
digikam-5.8.0.fix-db-migration-0004.patch to fix MySQL DB
|
||||
migration issues (kde#388824, kde#388867, kde#388977)
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Wed Jan 17 18:50:08 UTC 2018 - wbauer@tmo.at
|
||||
|
||||
|
16
digikam.spec
16
digikam.spec
@ -34,6 +34,14 @@ Patch2: 0002-Revert-replace-obsolete-qSort-function.patch
|
||||
Patch3: fix-italian-docs-with-older-kdoctools.patch
|
||||
# PATCH-FIX-UPSTREAM
|
||||
Patch4: fix-font-size-in-tooltips.patch
|
||||
# PATCH-FIX-UPSTREAM digikam-5.8.0.fix-db-migration-0001.patch -- fix MySQL DB migration issues (kde#388824, kde#388867, kde#388977)
|
||||
Patch5: digikam-5.8.0.fix-db-migration-0001.patch
|
||||
# PATCH-FIX-UPSTREAM
|
||||
Patch6: digikam-5.8.0.fix-db-migration-0002.patch
|
||||
# PATCH-FIX-UPSTREAM
|
||||
Patch7: digikam-5.8.0.fix-db-migration-0003.patch
|
||||
# PATCH-FIX-UPSTREAM
|
||||
Patch8: digikam-5.8.0.fix-db-migration-0004.patch
|
||||
#This pulls in QWebEngine, which is not available on ppc64
|
||||
%ifarch %ix86 x86_64 %arm aarch64 mips mips64
|
||||
BuildRequires: akonadi-contact-devel
|
||||
@ -185,6 +193,14 @@ The main digikam libraries that are being shared between showfoto and digikam
|
||||
%endif
|
||||
%patch4 -p1
|
||||
|
||||
# DB migration fixes
|
||||
cd core
|
||||
%patch5 -p1
|
||||
%patch6 -p1
|
||||
%patch7 -p1
|
||||
%patch8 -p1
|
||||
cd ..
|
||||
|
||||
# Remove build time references so build-compare can do its work
|
||||
FAKE_BUILDDATE=$(LC_ALL=C date -u -r %{_sourcedir}/%{name}.changes '+%%b %%e %%Y')
|
||||
FAKE_BUILDTIME=$(LC_ALL=C date -u -r %{_sourcedir}/%{name}.changes '+%%H:%%M')
|
||||
|
Loading…
Reference in New Issue
Block a user