|
|
@ -92,7 +92,11 @@ bool PqxxMigrate::drv_readTableSchema(
|
|
|
|
for (uint i = 0; i < (uint)m_res->columns(); i++)
|
|
|
|
for (uint i = 0; i < (uint)m_res->columns(); i++)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
TQString fldName(m_res->column_name(i));
|
|
|
|
TQString fldName(m_res->column_name(i));
|
|
|
|
|
|
|
|
#if PQXX_VERSION_MAJOR < 7
|
|
|
|
KexiDB::Field::Type fldType = type(m_res->column_type(i), fldName);
|
|
|
|
KexiDB::Field::Type fldType = type(m_res->column_type(i), fldName);
|
|
|
|
|
|
|
|
#else
|
|
|
|
|
|
|
|
KexiDB::Field::Type fldType = type(m_res->column_type(m_res->column_name(i)), fldName);
|
|
|
|
|
|
|
|
#endif
|
|
|
|
TQString fldID( KexiUtils::string2Identifier(fldName) );
|
|
|
|
TQString fldID( KexiUtils::string2Identifier(fldName) );
|
|
|
|
const pqxx::oid toid = tableOid(originalName);
|
|
|
|
const pqxx::oid toid = tableOid(originalName);
|
|
|
|
if (toid==0)
|
|
|
|
if (toid==0)
|
|
|
@ -249,7 +253,9 @@ bool PqxxMigrate::drv_disconnect()
|
|
|
|
{
|
|
|
|
{
|
|
|
|
if (m_conn)
|
|
|
|
if (m_conn)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
|
|
|
|
#if PQXX_VERSION_MAJOR < 7
|
|
|
|
m_conn->disconnect();
|
|
|
|
m_conn->disconnect();
|
|
|
|
|
|
|
|
#endif
|
|
|
|
delete m_conn;
|
|
|
|
delete m_conn;
|
|
|
|
m_conn = 0;
|
|
|
|
m_conn = 0;
|
|
|
|
}
|
|
|
|
}
|
|
|
|