mirror of
https://github.com/chris2511/xca.git
synced 2026-09-12 19:51:05 +05:00
Fix missing takeys table in new databases
The "takeys" table was only created for existing databases. New databases were immediately marked as version "8" databases and the tykeys table creation was skipped.
This commit is contained in:
parent
582ee06a2d
commit
f3ed7ef09e
@ -73,7 +73,11 @@ const QString &database_model::detect_provider()
|
||||
QSqlError database_model::initSqlDB()
|
||||
{
|
||||
#define MAX_SCHEMAS 8
|
||||
#define SCHEMA_VERSION "8"
|
||||
/* The initial SQL creation data creates a version "7"
|
||||
* database. Then an update to Version 8 by creating "takeys"
|
||||
* is executed.
|
||||
*/
|
||||
#define INITIAL_SCHEMA_VERSION "7"
|
||||
|
||||
QStringList schemas[MAX_SCHEMAS];
|
||||
|
||||
|
||||
@ -32,7 +32,7 @@
|
||||
<< "CREATE TABLE settings ("
|
||||
"key_ CHAR(20) UNIQUE, " // mySql does not like 'key' or 'option"
|
||||
"value " B64_BLOB ")"
|
||||
<< "INSERT INTO settings (key_, value) VALUES ('schema', '" SCHEMA_VERSION "')"
|
||||
<< "INSERT INTO settings (key_, value) VALUES ('schema', '" INITIAL_SCHEMA_VERSION "')"
|
||||
|
||||
/*
|
||||
* All items (keys, tokens, requests, certs, crls, templates)
|
||||
|
||||
Loading…
Reference in New Issue
Block a user