mirror of
https://github.com/ElvishArtisan/rivendell.git
synced 2025-10-11 00:53:53 +02:00
2016-05-20 Fred Gleason <fredg@paravelsystems.com>
* Removed the 'not null' attribute from the 'LOGS.LINK_DATETIME', 'LOGS.START_DATE' and 'LOGS.END_DATE' fields in the database [GitHub issue #000121]. * Incremented the database version to 257.
This commit is contained in:
@@ -171,6 +171,10 @@ void MainObject::Revert(int schema) const
|
||||
case 256:
|
||||
Revert256();
|
||||
break;
|
||||
|
||||
case 257:
|
||||
Revert257();
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -427,6 +431,27 @@ void MainObject::Revert256() const
|
||||
}
|
||||
|
||||
|
||||
void MainObject::Revert257() const
|
||||
{
|
||||
QString sql;
|
||||
QSqlQuery *q;
|
||||
|
||||
sql=QString("alter table LOGS modify column LINK_DATETIME datetime not null");
|
||||
q=new QSqlQuery(sql);
|
||||
delete q;
|
||||
|
||||
sql=QString("alter table LOGS modify column START_DATE date not null");
|
||||
q=new QSqlQuery(sql);
|
||||
delete q;
|
||||
|
||||
sql=QString("alter table LOGS modify column END_DATE date not null");
|
||||
q=new QSqlQuery(sql);
|
||||
delete q;
|
||||
|
||||
SetVersion(256);
|
||||
}
|
||||
|
||||
|
||||
int MainObject::GetVersion() const
|
||||
{
|
||||
QString sql;
|
||||
|
@@ -52,6 +52,7 @@ class MainObject : public QObject
|
||||
void Revert254() const;
|
||||
void Revert255() const;
|
||||
void Revert256() const;
|
||||
void Revert257() const;
|
||||
int GetVersion() const;
|
||||
void SetVersion(int schema) const;
|
||||
int MapSchema(const QString &ver);
|
||||
|
Reference in New Issue
Block a user