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:
Fred Gleason
2016-05-20 16:45:56 -04:00
parent 5d0ee9cd38
commit db9da6dc62
5 changed files with 52 additions and 6 deletions

View File

@@ -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;

View File

@@ -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);