Skip to content

Commit

Permalink
fix #7560
Browse files Browse the repository at this point in the history
  • Loading branch information
jef-n committed Apr 13, 2013
1 parent b79932c commit 3a7a897
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 2 deletions.
3 changes: 3 additions & 0 deletions src/providers/mssql/qgsmssqlprovider.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1362,6 +1362,9 @@ bool QgsMssqlProvider::convertField( QgsField &field )
fieldPrec = 0;
break;

case QVariant::DateTime:
case QVariant::Date:
case QVariant::Time:
case QVariant::String:
fieldType = "nvarchar(max)";
fieldPrec = -1;
Expand Down
7 changes: 7 additions & 0 deletions src/providers/oracle/qgsoracleprovider.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2316,11 +2316,18 @@ bool QgsOracleProvider::convertField( QgsField &field )
fieldPrec = 0;
break;

case QVariant::DateTime:
case QVariant::Time:
case QVariant::String:
fieldType = "VARCHAR2(2047)";
fieldPrec = -1;
break;

case QVariant::Date:
fieldType = "DATE";
fieldPrec = -1;
break;

case QVariant::Int:
fieldType = "NUMBER(10,0)";
fieldSize = -1;
Expand Down
6 changes: 4 additions & 2 deletions src/providers/postgres/qgspostgresprovider.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2761,6 +2761,8 @@ bool QgsPostgresProvider::convertField( QgsField &field )
fieldPrec = 0;
break;

case QVariant::DateTime:
case QVariant::Time:
case QVariant::String:
fieldType = "varchar";
fieldPrec = -1;
Expand All @@ -2779,8 +2781,8 @@ bool QgsPostgresProvider::convertField( QgsField &field )
break;

case QVariant::Date:
fieldType = "numeric";
fieldSize = -1;
fieldType = "date";
fieldPrec = 0;
break;

case QVariant::Double:
Expand Down
3 changes: 3 additions & 0 deletions src/providers/spatialite/qgsspatialiteprovider.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,9 @@ bool QgsSpatiaLiteProvider::convertField( QgsField &field )
fieldPrec = 0;
break;

case QVariant::DateTime:
case QVariant::Date:
case QVariant::Time:
case QVariant::String:
fieldType = "TEXT";
fieldPrec = -1;
Expand Down

0 comments on commit 3a7a897

Please sign in to comment.