diff options
Diffstat (limited to 'kexi/migration')
-rw-r--r-- | kexi/migration/keximigrate.cpp | 3 | ||||
-rw-r--r-- | kexi/migration/mysql/mysqlmigrate.cpp | 4 | ||||
-rw-r--r-- | kexi/migration/pqxx/pqxxmigrate.cpp | 10 |
3 files changed, 12 insertions, 5 deletions
diff --git a/kexi/migration/keximigrate.cpp b/kexi/migration/keximigrate.cpp index 1c3295b6..5783d11c 100644 --- a/kexi/migration/keximigrate.cpp +++ b/kexi/migration/keximigrate.cpp @@ -491,7 +491,6 @@ void KexiMigrate::updateProgress(TQ_ULLONG step) { // Prompt the user to choose a field type KexiDB::Field::Type KexiMigrate::userType(const TQString& fname) { - KInputDialog *dlg; TQStringList types; TQString res; @@ -509,7 +508,7 @@ KexiDB::Field::Type KexiMigrate::userType(const TQString& fname) types << "Long Text"; types << "Binary Large Object"; - res = dlg->getItem( i18n("Field Type"), + res = KInputDialog::getItem( i18n("Field Type"), i18n("The data type for %1 could not be determined. " "Please select one of the following data " "types").arg(fname), diff --git a/kexi/migration/mysql/mysqlmigrate.cpp b/kexi/migration/mysql/mysqlmigrate.cpp index 78671241..1025f1f3 100644 --- a/kexi/migration/mysql/mysqlmigrate.cpp +++ b/kexi/migration/mysql/mysqlmigrate.cpp @@ -420,9 +420,9 @@ KexiDB::Field::Type MySQLMigrate::examineBlobField(const TQString& table, if(mysqlType.contains("blob", false) != 0) { // Doesn't matter how big it is, it's binary kexiType = KexiDB::Field::BLOB; - } else if(mysqlType.contains("text", false) != 0) { +/* } else if(mysqlType.contains("text", false) != 0) { // All the TEXT types are too big for Kexi text. - kexiType = KexiDB::Field::BLOB; + kexiType = KexiDB::Field::BLOB;*/ } else if(fld->length < 200) { kexiType = KexiDB::Field::Text; } else { diff --git a/kexi/migration/pqxx/pqxxmigrate.cpp b/kexi/migration/pqxx/pqxxmigrate.cpp index 904e0c92..2ca476d4 100644 --- a/kexi/migration/pqxx/pqxxmigrate.cpp +++ b/kexi/migration/pqxx/pqxxmigrate.cpp @@ -538,10 +538,18 @@ bool PqxxMigrate::drv_copyTable(const TQString& srcTable, KexiDB::Connection *de int index = 0; for ( i = R.begin(); i != end; ++i, index++) { if (fieldsExpanded.at(index)->field->type()==KexiDB::Field::BLOB || fieldsExpanded.at(index)->field->type()==KexiDB::Field::LongText) + { vals.append( KexiDB::pgsqlByteaToByteArray((*i).c_str(), (*i).size()) ); - else + } + else if (fieldsExpanded.at(index)->field->type()==KexiDB::Field::Boolean ) + { + vals.append(QString((*i).c_str()).lower() == "t" ? QVariant(true, 1) : QVariant(false, 1)); + } + else + { vals.append( KexiDB::cstringToVariant((*i).c_str(), fieldsExpanded.at(index)->field, (*i).size()) ); + } } if (!destConn->insertRecord(*dstTable, vals)) return false; |