Compare commits
No commits in common. "2d950fb026183828735205040558168f200b524f" and "3a9f4c1234f877a4da3f43c2016a149da27e3751" have entirely different histories.
2d950fb026
...
3a9f4c1234
|
|
@ -1 +1 @@
|
|||
set(QT_REPO_MODULE_VERSION "6.7.2")
|
||||
set(QT_REPO_MODULE_VERSION "0.7.0")
|
||||
|
|
|
|||
|
|
@ -1,16 +1,24 @@
|
|||
name: CI Build
|
||||
|
||||
on: [push]
|
||||
on:
|
||||
push:
|
||||
branches-ignore:
|
||||
- "releases/**"
|
||||
paths-ignore:
|
||||
- "**.md"
|
||||
pull_request:
|
||||
paths-ignore:
|
||||
- "**.md"
|
||||
|
||||
jobs:
|
||||
build:
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
qt_version: [5.15.2, 6.4.0]
|
||||
qt_version: [5.12.11, 5.15.2, 6.2.0]
|
||||
platform: [ubuntu-20.04, windows-latest, macos-latest]
|
||||
include:
|
||||
- qt_version: 6.4.0
|
||||
- qt_version: 6.2.0
|
||||
additional_arguments: -D QT_DEFAULT_MAJOR_VERSION=6
|
||||
build_cmake: true
|
||||
- platform: ubuntu-20.04
|
||||
|
|
@ -85,7 +93,7 @@ jobs:
|
|||
cmake --build .
|
||||
|
||||
- name: Seutp postgres
|
||||
if: contains(matrix.tests, 'posgtresql')
|
||||
if: false #contains(matrix.tests, 'posgtresql')
|
||||
uses: ikalnytskyi/action-setup-postgres@v1
|
||||
|
||||
- name: Setup sql server
|
||||
|
|
@ -97,7 +105,7 @@ jobs:
|
|||
show-log: true
|
||||
|
||||
- name: Check sql server
|
||||
if: contains(matrix.tests, 'mssql')
|
||||
if: false #contains(matrix.tests, 'mssql')
|
||||
run: sqlcmd -S localhost -U sa -P NUT_sa_PASS_1_??? -d tempdb -Q "SELECT @@version;"
|
||||
|
||||
- name: Run tests with sqlite
|
||||
|
|
@ -121,7 +129,7 @@ jobs:
|
|||
${{ matrix.make }} run-tests
|
||||
|
||||
- name: Run tests with mysql
|
||||
if: false #contains(matrix.tests, 'mysql')
|
||||
if: contains(matrix.tests, 'mysql')
|
||||
#continue-on-error: true
|
||||
run: |
|
||||
sudo systemctl start mysql.service
|
||||
|
|
@ -132,7 +140,7 @@ jobs:
|
|||
${{ matrix.make }} run-tests
|
||||
|
||||
- name: Run tests with sql server
|
||||
if: false #contains(matrix.tests, 'mssql')
|
||||
if: contains(matrix.tests, 'mssql')
|
||||
continue-on-error: true
|
||||
run: |
|
||||
rm tests/auto/common/test_params.h
|
||||
|
|
|
|||
|
|
@ -5,9 +5,9 @@ cmake_minimum_required(VERSION 3.16)
|
|||
set(CMAKE_AUTOMOC ON)
|
||||
|
||||
include(.cmake.conf)
|
||||
project(QtNut
|
||||
VERSION "${QT_REPO_MODULE_VERSION}"
|
||||
DESCRIPTION "Qt orm library"
|
||||
project(Nut
|
||||
VERSION "0.7.0"
|
||||
DESCRIPTION "Nut"
|
||||
HOMEPAGE_URL "https://github.com/HamedMasafi/Nut"
|
||||
LANGUAGES CXX C
|
||||
)
|
||||
|
|
|
|||
|
|
@ -42,17 +42,13 @@ qt_internal_add_module(Nut
|
|||
phrases/phrasedata.cpp phrases/phrasedata.h
|
||||
phrases/phrasedatalist.cpp phrases/phrasedatalist.h
|
||||
phrases/phraselist.cpp phrases/phraselist.h
|
||||
phrases/numericphrase.cpp phrases/numericphrase.h
|
||||
types/dbgeography.cpp types/dbgeography.h
|
||||
|
||||
NutGlobal
|
||||
DEFINES
|
||||
NUT_BUILD_LIB
|
||||
NUT_SHARED
|
||||
NUT_SHARED_POINTER
|
||||
QT_DEPRECATED_WARNINGS
|
||||
INCLUDE_DIRECTORIES
|
||||
.
|
||||
config
|
||||
core
|
||||
generators
|
||||
|
|
@ -63,7 +59,6 @@ qt_internal_add_module(Nut
|
|||
Qt::Core
|
||||
Qt::Gui
|
||||
Qt::Sql
|
||||
GENERATE_CPP_EXPORTS
|
||||
)
|
||||
|
||||
#### Keys ignored in scope 1:.:.:nut.pro:<TRUE>:
|
||||
|
|
|
|||
|
|
@ -1 +0,0 @@
|
|||
#include "config/nut_global.h"
|
||||
|
|
@ -19,8 +19,6 @@
|
|||
**************************************************************************/
|
||||
|
||||
#include <QWeakPointer>
|
||||
#include <QList>
|
||||
#include <QMutableListIterator>
|
||||
|
||||
#include "table.h"
|
||||
#include "database.h"
|
||||
|
|
@ -59,16 +57,19 @@ int AbstractTableSet::save(Database *db)
|
|||
masterModel = db->model().tableByClassName(
|
||||
QString::fromUtf8(data->table->metaObject()->className()));
|
||||
|
||||
//TODO: find a better replacement for QMutableListIterator
|
||||
auto tmp = data->weakChildren;
|
||||
data->weakChildren.clear();
|
||||
for (auto &w: tmp) {
|
||||
QMutableListIterator<QWeakPointer<Table>> weaks(data->weakChildren);
|
||||
while (weaks.hasNext()) {
|
||||
auto &row = weaks.next();
|
||||
|
||||
if (!w)
|
||||
if (!row) {
|
||||
weaks.remove();
|
||||
continue;
|
||||
auto t = w.lock();
|
||||
if (t.isNull())
|
||||
}
|
||||
auto t = row.lock();
|
||||
if (t.isNull()) {
|
||||
weaks.remove();
|
||||
continue;
|
||||
}
|
||||
|
||||
if (data->table)
|
||||
t->setParentTable(data->table,
|
||||
|
|
@ -80,15 +81,16 @@ int AbstractTableSet::save(Database *db)
|
|||
|| t->status() == Table::Deleted) {
|
||||
rowsAffected += t->save(db);
|
||||
}
|
||||
data->weakChildren << w;
|
||||
}
|
||||
|
||||
auto tmp2 = data->children;
|
||||
data->children.clear();
|
||||
QMutableListIterator<QSharedPointer<Table>> childs(data->children);
|
||||
|
||||
for (auto &row : tmp2) {
|
||||
if (!row)
|
||||
while (childs.hasNext()) {
|
||||
auto &row = childs.next();
|
||||
if (!row) {
|
||||
childs.remove();
|
||||
continue;
|
||||
}
|
||||
|
||||
if (data->table)
|
||||
row->setParentTable(data->table,
|
||||
|
|
@ -101,9 +103,9 @@ int AbstractTableSet::save(Database *db)
|
|||
rowsAffected += row->save(db);
|
||||
data->weakChildren.append(row.toWeakRef());
|
||||
|
||||
childs.remove();
|
||||
continue;
|
||||
}
|
||||
data->children << row;
|
||||
}
|
||||
|
||||
// data->children.clear();
|
||||
|
|
|
|||
|
|
@ -136,10 +136,8 @@ bool DatabasePrivate::updateDatabase()
|
|||
|
||||
QString databaseHistoryName = driver + QStringLiteral("\t") + databaseName + QStringLiteral("\t") + hostName;
|
||||
|
||||
if (allTableMaps.contains(QString::fromUtf8(q->metaObject()->className()))) {
|
||||
currentModel = allTableMaps[QString::fromUtf8(q->metaObject()->className())];
|
||||
if (updatedDatabases.contains(databaseHistoryName))
|
||||
return true;
|
||||
}
|
||||
|
||||
if (!getCurrentSchema())
|
||||
return true;
|
||||
|
|
@ -302,12 +300,6 @@ bool DatabasePrivate::getCurrentSchema()
|
|||
return true;
|
||||
}
|
||||
|
||||
bool DatabasePrivate::isFirstOpen()
|
||||
{
|
||||
Q_Q(Database);
|
||||
return !allTableMaps.contains(QString::fromUtf8(q->metaObject()->className()));
|
||||
}
|
||||
|
||||
DatabaseModel DatabasePrivate::getLastSchema()
|
||||
{
|
||||
Row<ChangeLogTable> u = changeLogs->query()
|
||||
|
|
@ -563,10 +555,10 @@ bool Database::open(bool updateDatabase)
|
|||
d->sqlGenerator = new SqliteGenerator(this);
|
||||
else if (d->driver == QStringLiteral("QODBC") || d->driver == QStringLiteral("QODBC3")) {
|
||||
QString driverName = QString();
|
||||
QStringList parts = d->databaseName.toLower().split(QLatin1Char(';'));
|
||||
QStringList parts = d->databaseName.toLower().split(';');
|
||||
for (auto &p: parts)
|
||||
if (p.trimmed().startsWith(QStringLiteral("driver=")))
|
||||
driverName = p.split(QLatin1Char('=')).at(1).toLower().trimmed();
|
||||
driverName = p.split('=').at(1).toLower().trimmed();
|
||||
|
||||
// if (driverName == "{sql server}")
|
||||
d->sqlGenerator = new SqlServerGenerator(this);
|
||||
|
|
@ -615,7 +607,7 @@ int Database::saveChanges()
|
|||
}
|
||||
|
||||
int rowsAffected = 0;
|
||||
for (const auto &ts: std::as_const(d->tableSets))
|
||||
for (const auto &ts: qAsConst(d->tableSets))
|
||||
rowsAffected += ts->save(this);
|
||||
|
||||
return rowsAffected;
|
||||
|
|
@ -624,7 +616,7 @@ int Database::saveChanges()
|
|||
void Database::cleanUp()
|
||||
{
|
||||
Q_D(Database);
|
||||
for (const auto &ts: std::as_const(d->tableSets))
|
||||
for (const auto &ts: qAsConst(d->tableSets))
|
||||
ts->clearChildren();
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -79,7 +79,6 @@ public:
|
|||
|
||||
QSet<AbstractTableSet *> tableSets;
|
||||
|
||||
bool isFirstOpen();
|
||||
bool isDatabaseNew;
|
||||
|
||||
QString errorMessage;
|
||||
|
|
|
|||
|
|
@ -22,7 +22,7 @@
|
|||
#define FOREIGNCONTAINER_H
|
||||
|
||||
#include <QtGlobal>
|
||||
#include <QtNut/nut_global.h>
|
||||
#include <QtNut/NutGlobal>
|
||||
|
||||
QT_BEGIN_NAMESPACE
|
||||
|
||||
|
|
|
|||
|
|
@ -30,7 +30,6 @@
|
|||
#include <QtSql/QSqlError>
|
||||
#include <QtSql/QSqlQueryModel>
|
||||
#include <QtSql/QSqlQuery>
|
||||
#include <QHashIterator>
|
||||
|
||||
#ifndef NUT_RAW_POINTER
|
||||
#include <QtCore/QSharedPointer>
|
||||
|
|
@ -139,10 +138,10 @@ public:
|
|||
QList<O> select(const std::function<O(const QSqlQuery &q)> allocator);
|
||||
|
||||
int count();
|
||||
QVariant max(const AbstractFieldPhrase &f);
|
||||
QVariant min(const AbstractFieldPhrase &f);
|
||||
QVariant sum(const AbstractFieldPhrase &f);
|
||||
QVariant average(const AbstractFieldPhrase &f);
|
||||
QVariant max(const FieldPhrase<int> &f);
|
||||
QVariant min(const FieldPhrase<int> &f);
|
||||
QVariant sum(const FieldPhrase<int> &f);
|
||||
QVariant average(const FieldPhrase<int> &f);
|
||||
|
||||
|
||||
//data mailpulation
|
||||
|
|
@ -294,7 +293,10 @@ Q_OUTOFLINE_TEMPLATE RowList<T> Query<T>::toList(int count)
|
|||
for (int j = 0; j < levels.count(); ++j) {
|
||||
LevelData &dt = levels[j];
|
||||
|
||||
for (auto it = masters.constBegin(); it != masters.constEnd(); ++it) {
|
||||
QHashIterator<QString, QString> it(masters);
|
||||
while (it.hasNext()) {
|
||||
it.next();
|
||||
|
||||
if (dt.table->name() == it.key()) {
|
||||
data.masters.append(j);
|
||||
data.masterFields.append(it.value());
|
||||
|
|
@ -496,7 +498,7 @@ Q_OUTOFLINE_TEMPLATE int Query<T>::count()
|
|||
}
|
||||
|
||||
template <class T>
|
||||
Q_OUTOFLINE_TEMPLATE QVariant Query<T>::max(const AbstractFieldPhrase &f)
|
||||
Q_OUTOFLINE_TEMPLATE QVariant Query<T>::max(const FieldPhrase<int> &f)
|
||||
{
|
||||
if (!d->hasCustomCommand) {
|
||||
d->joins.prepend(d->tableName);
|
||||
|
|
@ -515,7 +517,7 @@ Q_OUTOFLINE_TEMPLATE QVariant Query<T>::max(const AbstractFieldPhrase &f)
|
|||
}
|
||||
|
||||
template <class T>
|
||||
Q_OUTOFLINE_TEMPLATE QVariant Query<T>::min(const AbstractFieldPhrase &f)
|
||||
Q_OUTOFLINE_TEMPLATE QVariant Query<T>::min(const FieldPhrase<int> &f)
|
||||
{
|
||||
if (!d->hasCustomCommand) {
|
||||
d->joins.prepend(d->tableName);
|
||||
|
|
@ -534,7 +536,7 @@ Q_OUTOFLINE_TEMPLATE QVariant Query<T>::min(const AbstractFieldPhrase &f)
|
|||
}
|
||||
|
||||
template <class T>
|
||||
Q_OUTOFLINE_TEMPLATE QVariant Query<T>::sum(const AbstractFieldPhrase &f)
|
||||
Q_OUTOFLINE_TEMPLATE QVariant Query<T>::sum(const FieldPhrase<int> &f)
|
||||
{
|
||||
if (!d->hasCustomCommand) {
|
||||
d->joins.prepend(d->tableName);
|
||||
|
|
@ -553,7 +555,7 @@ Q_OUTOFLINE_TEMPLATE QVariant Query<T>::sum(const AbstractFieldPhrase &f)
|
|||
}
|
||||
|
||||
template <class T>
|
||||
Q_OUTOFLINE_TEMPLATE QVariant Query<T>::average(const AbstractFieldPhrase &f)
|
||||
Q_OUTOFLINE_TEMPLATE QVariant Query<T>::average(const FieldPhrase<int> &f)
|
||||
{
|
||||
if (!d->hasCustomCommand) {
|
||||
d->joins.prepend(d->tableName);
|
||||
|
|
@ -706,7 +708,7 @@ Q_OUTOFLINE_TEMPLATE void Query<T>::toModel(QSqlQueryModel *model)
|
|||
int fieldIndex = 0;
|
||||
|
||||
if (d->fieldPhrase.data.count()) {
|
||||
for (const auto &pd : std::as_const(d->fieldPhrase.data)) {
|
||||
for (const auto &pd : qAsConst(d->fieldPhrase.data)) {
|
||||
QString displayName = dbModel.tableByClassName(QString::fromUtf8(pd->className))
|
||||
->field(QString::fromUtf8(pd->fieldName))
|
||||
->displayName;
|
||||
|
|
|
|||
|
|
@ -22,7 +22,7 @@
|
|||
#define SQLSERIALIZER_H
|
||||
|
||||
#include <QVariant>
|
||||
#include <QtNut/nut_global.h>
|
||||
#include <QtNut/NutGlobal>
|
||||
|
||||
QT_BEGIN_NAMESPACE
|
||||
|
||||
|
|
|
|||
|
|
@ -170,7 +170,7 @@ void Table::setParentTableSet(AbstractTableSet *parent)
|
|||
AbstractTableSet *Table::childTableSet(const QString &name) const
|
||||
{
|
||||
//Q_D(const Table);
|
||||
for (auto &t: std::as_const(d->childTableSets))
|
||||
for (auto &t: qAsConst(d->childTableSets))
|
||||
if (t->childClassName() == name)
|
||||
return t;
|
||||
return Q_NULLPTR;
|
||||
|
|
@ -185,7 +185,7 @@ int Table::save(Database *db)
|
|||
if(status() == Added && model->isPrimaryKeyAutoIncrement())
|
||||
setProperty(model->primaryKey().toLatin1().data(), q.lastInsertId());
|
||||
|
||||
for (auto &ts: std::as_const(d->childTableSets))
|
||||
foreach(AbstractTableSet *ts, d->childTableSets)
|
||||
ts->save(db);
|
||||
setStatus(FetchedFromDB);
|
||||
|
||||
|
|
|
|||
|
|
@ -610,7 +610,7 @@ QString AbstractSqlGenerator::selectCommand(const QString &tableName,
|
|||
tables << rel->masterTable << rel->slaveTable;
|
||||
|
||||
selectText = QString();
|
||||
for (auto &t: std::as_const(tables)) {
|
||||
for (auto &t: qAsConst(tables)) {
|
||||
if (!selectText.isEmpty())
|
||||
selectText.append(QStringLiteral(", "));
|
||||
selectText.append(recordsPhrase(t));
|
||||
|
|
|
|||
|
|
@ -287,10 +287,6 @@ QString SqliteGenerator::createConditionalPhrase(const PhraseData *d) const
|
|||
return QStringLiteral("CAST(strftime('%d', %1) AS INT)")
|
||||
.arg(createConditionalPhrase(d->left));
|
||||
|
||||
case PhraseData::DatePartDayOfWeek:
|
||||
return QStringLiteral("CAST(strftime('%w', %1) AS INT)")
|
||||
.arg(createConditionalPhrase(d->left));
|
||||
|
||||
case PhraseData::DatePartHour:
|
||||
return QStringLiteral("CAST(strftime('%H', %1) AS INT)")
|
||||
.arg(createConditionalPhrase(d->left));
|
||||
|
|
|
|||
|
|
@ -266,9 +266,6 @@ QString SqlServerGenerator::createConditionalPhrase(const PhraseData *d) const
|
|||
|
||||
if (d->type == PhraseData::WithoutOperand) {
|
||||
switch (op) {
|
||||
case PhraseData::DatePartDayOfWeek:
|
||||
return QStringLiteral("DATEPART(WEEKDAY, %1)")
|
||||
.arg(createConditionalPhrase(d->left));
|
||||
case PhraseData::DatePartYear:
|
||||
case PhraseData::DatePartMonth:
|
||||
case PhraseData::DatePartDay:
|
||||
|
|
|
|||
|
|
@ -227,13 +227,12 @@ DatabaseModel *DatabaseModel::modelByName(const QString &name)
|
|||
|
||||
void DatabaseModel::deleteAllModels()
|
||||
{
|
||||
//TODO: recheck this
|
||||
// QMapIterator<QString, DatabaseModel*> i(_models);
|
||||
// while (i.hasNext()) {
|
||||
// i.next();
|
||||
//// cout << i.key() << ": " << i.value() << endl;
|
||||
//// qDeleteAll(i.value());
|
||||
// }
|
||||
QMapIterator<QString, DatabaseModel*> i(_models);
|
||||
while (i.hasNext()) {
|
||||
i.next();
|
||||
// cout << i.key() << ": " << i.value() << endl;
|
||||
// qDeleteAll(i.value());
|
||||
}
|
||||
// qDeleteAll(_models.values());
|
||||
_models.clear();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -38,4 +38,7 @@
|
|||
#include <QtNut/fieldphrase_qstring.h>
|
||||
#include <QtNut/fieldphrase_bool.h>
|
||||
|
||||
QT_BEGIN_NAMESPACE
|
||||
QT_END_NAMESPACE
|
||||
|
||||
#endif // PHRASE_H
|
||||
|
|
|
|||
|
|
@ -23,6 +23,7 @@
|
|||
|
||||
#include <QtNut/nut_global.h>
|
||||
#include <QtNut/assignmentphraselist.h>
|
||||
#include <QtNut/NutGlobal>
|
||||
|
||||
QT_BEGIN_NAMESPACE
|
||||
|
||||
|
|
|
|||
|
|
@ -52,10 +52,6 @@ ConditionalPhrase FieldPhrase<QDate>::day() {
|
|||
return ConditionalPhrase(this, PhraseData::DatePartDay);
|
||||
}
|
||||
|
||||
ConditionalPhrase FieldPhrase<QDate>::dayOfWeek() {
|
||||
return ConditionalPhrase(this, PhraseData::DatePartDayOfWeek);
|
||||
}
|
||||
|
||||
FieldPhrase<QTime>::FieldPhrase(const char *className, const char *s) :
|
||||
AbstractFieldPhrase(className, s)
|
||||
{}
|
||||
|
|
@ -129,10 +125,6 @@ ConditionalPhrase FieldPhrase<QDateTime>::day() {
|
|||
return ConditionalPhrase(this, PhraseData::DatePartDay);
|
||||
}
|
||||
|
||||
ConditionalPhrase FieldPhrase<QDateTime>::dayOfWeek() {
|
||||
return ConditionalPhrase(this, PhraseData::DatePartDayOfWeek);
|
||||
}
|
||||
|
||||
ConditionalPhrase FieldPhrase<QDateTime>::hour() {
|
||||
return ConditionalPhrase(this, PhraseData::DatePartHour);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -75,8 +75,6 @@ public:
|
|||
ConditionalPhrase year();
|
||||
ConditionalPhrase month();
|
||||
ConditionalPhrase day();
|
||||
|
||||
ConditionalPhrase dayOfWeek();
|
||||
};
|
||||
|
||||
template<>
|
||||
|
|
@ -117,8 +115,6 @@ public:
|
|||
ConditionalPhrase month();
|
||||
ConditionalPhrase day();
|
||||
|
||||
ConditionalPhrase dayOfWeek();
|
||||
|
||||
ConditionalPhrase hour();
|
||||
ConditionalPhrase minute();
|
||||
ConditionalPhrase second();
|
||||
|
|
|
|||
|
|
@ -80,8 +80,7 @@ public:
|
|||
DatePartHour,
|
||||
DatePartMinute,
|
||||
DatePartSecond,
|
||||
DatePartMilisecond,
|
||||
DatePartDayOfWeek
|
||||
DatePartMilisecond
|
||||
// // special types
|
||||
// Distance
|
||||
};
|
||||
|
|
|
|||
|
|
@ -3,6 +3,5 @@
|
|||
);
|
||||
%classnames = (
|
||||
"nut_global.h" => "NutGlobal"
|
||||
"numericphrase.h" => "NumericFieldPhrase"
|
||||
);
|
||||
$publicclassregexp = ".+";
|
||||
|
|
|
|||
|
|
@ -327,28 +327,6 @@ void BasicTest::emptyDatabase()
|
|||
// QTEST_ASSERT(commentsCount == 6);
|
||||
}
|
||||
|
||||
void BasicTest::multipleOpen()
|
||||
{
|
||||
for (int i = 0; i < 10; ++i) {
|
||||
WeblogDatabase database;
|
||||
database.setDriver(DRIVER);
|
||||
database.setHostName(HOST);
|
||||
database.setDatabaseName(DATABASE);
|
||||
database.setUserName(USERNAME);
|
||||
database.setPassword(PASSWORD);
|
||||
|
||||
bool ok = database.open();
|
||||
QVERIFY(ok);
|
||||
|
||||
auto q = database.posts()->query()
|
||||
.where(Post::idField() == postId)
|
||||
.orderBy(Post::idField())
|
||||
.toList();
|
||||
|
||||
QTEST_ASSERT(q.count() > 0);
|
||||
}
|
||||
}
|
||||
|
||||
void BasicTest::cleanupTestCase()
|
||||
{
|
||||
// post->deleteLater();
|
||||
|
|
|
|||
|
|
@ -45,7 +45,6 @@ private Q_SLOTS:
|
|||
void selectWithInvalidRelation();
|
||||
void modifyPost();
|
||||
void emptyDatabase();
|
||||
void multipleOpen();
|
||||
|
||||
void cleanupTestCase();
|
||||
};
|
||||
|
|
|
|||
|
|
@ -56,7 +56,7 @@ void Upgrades::version2()
|
|||
{
|
||||
DB2 db;
|
||||
initDb(db);
|
||||
QVERIFY(db.open());
|
||||
QTEST_ASSERT(db.open());
|
||||
|
||||
auto t = Nut::create<Table2>();
|
||||
t->setStr("0");
|
||||
|
|
|
|||
Loading…
Reference in New Issue