From ceb41a7f89ddf9716507466861828925357ab3f3 Mon Sep 17 00:00:00 2001 From: Maik Qualmann 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 @@ CALL drop_foreign_key('TagProperties', 'TagProperties_Tags'); CALL drop_foreign_key('ImageTagProperties', 'ImageTagProperties_Images'); CALL drop_foreign_key('ImageTagProperties', 'ImageTagProperties_Tags'); + ALTER TABLE AlbumRoots MODIFY COLUMN label LONGTEXT CHARACTER SET utf8 COLLATE utf8_general_ci; ALTER TABLE AlbumRoots MODIFY COLUMN identifier LONGTEXT CHARACTER SET utf8 COLLATE utf8_general_ci; ALTER TABLE AlbumRoots MODIFY COLUMN specificPath LONGTEXT CHARACTER SET utf8 COLLATE utf8_general_ci; @@ -2063,6 +2064,26 @@ ALTER TABLE ImageTagProperties MODIFY COLUMN property TEXT CHARACTER SET utf8 COLLATE utf8_general_ci; ALTER TABLE ImageTagProperties MODIFY COLUMN value LONGTEXT CHARACTER SET utf8 COLLATE utf8_general_ci; + DROP TABLE IF EXISTS ImageTagProperties_old; + DROP TABLE IF EXISTS TagProperties_old; + DROP TABLE IF EXISTS ImageRelations_old; + DROP TABLE IF EXISTS ImageHistory_old; + DROP TABLE IF EXISTS Settings_old; + DROP TABLE IF EXISTS DownloadHistory_old; + DROP TABLE IF EXISTS ImageProperties_old; + DROP TABLE IF EXISTS ImageTags_old; + DROP TABLE IF EXISTS Tags_old; + DROP TABLE IF EXISTS ImageCopyright_old; + DROP TABLE IF EXISTS ImageComments_old; + DROP TABLE IF EXISTS ImagePositions_old; + DROP TABLE IF EXISTS VideoMetadata_old; + DROP TABLE IF EXISTS ImageMetadata_old; + DROP TABLE IF EXISTS ImageInformation_old; + DROP TABLE IF EXISTS ImageHaarMatrix_old; + DROP TABLE IF EXISTS Images_old; + DROP TABLE IF EXISTS Albums_old; + DROP TABLE IF EXISTS AlbumRoots_old; + RENAME TABLE AlbumRoots TO AlbumRoots_old; CREATE TABLE AlbumRoots LIKE AlbumRoots_old; ALTER TABLE AlbumRoots -- cgit v0.11.2