digiKam
Loading...
Searching...
No Matches
thumbsdbschemaupdater.h
Go to the documentation of this file.
1/* ============================================================
2 *
3 * This file is a part of digiKam project
4 * https://www.digikam.org
5 *
6 * Date : 2009-05-29
7 * Description : Thumbnail DB schema update
8 *
9 * SPDX-FileCopyrightText: 2007-2009 by Marcel Wiesweg <marcel dot wiesweg at gmx dot de>
10 * SPDX-FileCopyrightText: 2010-2024 by Gilles Caulier <caulier dot gilles at gmail dot com>
11 *
12 * SPDX-License-Identifier: GPL-2.0-or-later
13 *
14 * ============================================================ */
15
16#pragma once
17
18// Local includes
19
20#include "digikam_export.h"
21
22namespace Digikam
23{
24
25class ThumbsDbAccess;
26class InitializationObserver;
27
28class DIGIKAM_EXPORT ThumbsDbSchemaUpdater
29{
30public:
31
32 static int schemaVersion();
33
34public:
35
36 explicit ThumbsDbSchemaUpdater(ThumbsDbAccess* const dbAccess);
38
39 bool update();
40 void setObserver(InitializationObserver* const observer);
41
42private:
43
44 bool startUpdates();
45 bool makeUpdates();
46 bool createDatabase();
47 bool createTables();
48 bool createIndices();
49 bool createTriggers();
50 bool updateV1ToV2();
51 bool updateV2ToV3();
52
53private:
54
55 // Disable
57 ThumbsDbSchemaUpdater& operator=(const ThumbsDbSchemaUpdater&) = delete;
58
59 class Private;
60 Private* const d = nullptr;
61};
62
63} // namespace Digikam
Definition collectionscannerobserver.h:47
Definition thumbsdbaccess.h:33
Definition thumbsdbschemaupdater.h:29
Definition datefolderview.cpp:34