Changeset View
Changeset View
Standalone View
Standalone View
src/server/storage/dbconfigpostgresql.h
Show All 16 Lines | 1 | /* | |||
---|---|---|---|---|---|
17 | 02110-1301, USA. | 17 | 02110-1301, USA. | ||
18 | */ | 18 | */ | ||
19 | 19 | | |||
20 | #ifndef DBCONFIGPOSTGRESQL_H | 20 | #ifndef DBCONFIGPOSTGRESQL_H | ||
21 | #define DBCONFIGPOSTGRESQL_H | 21 | #define DBCONFIGPOSTGRESQL_H | ||
22 | 22 | | |||
23 | #include "dbconfig.h" | 23 | #include "dbconfig.h" | ||
24 | 24 | | |||
25 | #include <shared/akoptional.h> | ||||
26 | | ||||
25 | namespace Akonadi | 27 | namespace Akonadi | ||
26 | { | 28 | { | ||
27 | namespace Server | 29 | namespace Server | ||
28 | { | 30 | { | ||
29 | 31 | | |||
30 | class DbConfigPostgresql : public DbConfig | 32 | class DbConfigPostgresql : public DbConfig | ||
31 | { | 33 | { | ||
32 | public: | 34 | public: | ||
Show All 35 Lines | |||||
68 | bool startInternalServer() override; | 70 | bool startInternalServer() override; | ||
69 | 71 | | |||
70 | /** | 72 | /** | ||
71 | * This method is called to stop the external server. | 73 | * This method is called to stop the external server. | ||
72 | */ | 74 | */ | ||
73 | void stopInternalServer() override; | 75 | void stopInternalServer() override; | ||
74 | 76 | | |||
75 | private: | 77 | private: | ||
78 | struct Versions { | ||||
79 | int clusterVersion = 0; | ||||
80 | int pgServerVersion = 0; | ||||
81 | }; | ||||
82 | akOptional<Versions> checkPgVersion() const; | ||||
83 | bool upgradeCluster(int clusterVersion); | ||||
84 | bool runInitDb(const QString &dbDataPath); | ||||
85 | | ||||
76 | bool checkServerIsRunning(); | 86 | bool checkServerIsRunning(); | ||
77 | 87 | | |||
78 | QString mDatabaseName; | 88 | QString mDatabaseName; | ||
79 | QString mHostName; | 89 | QString mHostName; | ||
80 | int mHostPort; | 90 | int mHostPort; | ||
81 | QString mUserName; | 91 | QString mUserName; | ||
82 | QString mPassword; | 92 | QString mPassword; | ||
83 | QString mConnectionOptions; | 93 | QString mConnectionOptions; | ||
84 | QString mServerPath; | 94 | QString mServerPath; | ||
85 | QString mInitDbPath; | 95 | QString mInitDbPath; | ||
86 | QString mPgData; | 96 | QString mPgData; | ||
97 | QString mPgUpgradePath; | ||||
87 | bool mInternalServer; | 98 | bool mInternalServer; | ||
88 | }; | 99 | }; | ||
89 | 100 | | |||
90 | } // namespace Server | 101 | } // namespace Server | ||
91 | } // namespace Akonadi | 102 | } // namespace Akonadi | ||
92 | 103 | | |||
93 | #endif | 104 | #endif |