mirror of
https://github.com/QuasarApp/Heart.git
synced 2025-05-12 01:19:42 +00:00
fix sql file
This commit is contained in:
parent
e217aadd48
commit
e00b1ede3c
@ -29,12 +29,12 @@ CREATE TABLE IF NOT EXISTS DefaultPermissions (
|
||||
FOREIGN KEY(dbAddress) REFERENCES MemberPermisions(dbAddress)
|
||||
ON UPDATE CASCADE
|
||||
ON DELETE CASCADE
|
||||
)
|
||||
);
|
||||
|
||||
CREATE TABLE IF NOT EXISTS DataBaseAttributes (
|
||||
name TEXT NOT NULL PRIMARY KEY,
|
||||
value INT NOT NULL UNIQUE
|
||||
)
|
||||
);
|
||||
|
||||
INSERT INTO "DataBaseAttributes" VALUES ("version", 0);
|
||||
|
||||
|
@ -36,6 +36,6 @@ CREATE TABLE IF NOT EXISTS DefaultPermissions (
|
||||
CREATE TABLE IF NOT EXISTS DataBaseAttributes (
|
||||
name TEXT NOT NULL PRIMARY KEY,
|
||||
value INT NOT NULL UNIQUE
|
||||
)
|
||||
);
|
||||
|
||||
INSERT INTO "DataBaseAttributes" VALUES ("version", 0);
|
||||
|
@ -66,11 +66,17 @@ bool DataBaseNode::initSqlDb(QString DBparamsFile,
|
||||
|
||||
if (DBparamsFile.isEmpty()) {
|
||||
params = defaultDbParams();
|
||||
return _db->init(params);
|
||||
}
|
||||
|
||||
if (!_db->init(DBparamsFile)) {
|
||||
return false;
|
||||
if (!_db->init(params)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
} else {
|
||||
|
||||
if (!_db->init(DBparamsFile)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
if (!upgradeDataBase()) {
|
||||
|
@ -36,10 +36,6 @@ protected:
|
||||
_ping.setAnsver(ping->ansver());
|
||||
}
|
||||
|
||||
QMap<int, std::function<bool (const QH::iObjectProvider *)> > dbPatches() const override{
|
||||
return {};
|
||||
};
|
||||
|
||||
|
||||
private:
|
||||
QH::PKG::Ping _ping;
|
||||
|
Loading…
x
Reference in New Issue
Block a user