aboutsummaryrefslogtreecommitdiffstats
path: root/Source/SPTableStructure.m
diff options
context:
space:
mode:
Diffstat (limited to 'Source/SPTableStructure.m')
-rw-r--r--Source/SPTableStructure.m93
1 files changed, 46 insertions, 47 deletions
diff --git a/Source/SPTableStructure.m b/Source/SPTableStructure.m
index 72c357d9..5b97c6b9 100644
--- a/Source/SPTableStructure.m
+++ b/Source/SPTableStructure.m
@@ -125,56 +125,55 @@ static NSString *SPRemoveFieldAndForeignKey = @"SPRemoveFieldAndForeignKey";
// Note that changing the contents or ordering of this array will affect the implementation of
// SPTableFieldValidation. See it's implementation file for more details.
- typeSuggestions = [[NSArray arrayWithObjects:
- @"TINYINT",
- @"SMALLINT",
- @"MEDIUMINT",
- @"INT",
- @"BIGINT",
- @"FLOAT",
- @"DOUBLE",
- @"DOUBLE PRECISION",
- @"REAL",
- @"DECIMAL",
- @"BIT",
- @"SERIAL",
- @"BOOL",
- @"BOOLEAN",
- @"DEC",
- @"FIXED",
- @"NUMERIC",
+ typeSuggestions = [@[
+ SPMySQLTinyIntType,
+ SPMySQLSmallIntType,
+ SPMySQLMediumIntType,
+ SPMySQLIntType,
+ SPMySQLBigIntType,
+ SPMySQLFloatType,
+ SPMySQLDoubleType,
+ SPMySQLDoublePrecisionType,
+ SPMySQLRealType,
+ SPMySQLDecimalType,
+ SPMySQLBitType,
+ SPMySQLSerialType,
+ SPMySQLBoolType,
+ SPMySQLBoolean,
+ SPMySQLDecType,
+ SPMySQLFixedType,
+ SPMySQLNumericType,
@"--------",
- @"CHAR",
- @"VARCHAR",
- @"TINYTEXT",
- @"TEXT",
- @"MEDIUMTEXT",
- @"LONGTEXT",
- @"TINYBLOB",
- @"MEDIUMBLOB",
- @"BLOB",
- @"LONGBLOB",
- @"BINARY",
- @"VARBINARY",
- @"ENUM",
- @"SET",
+ SPMySQLCharType,
+ SPMySQLVarCharType,
+ SPMySQLTinyTextType,
+ SPMySQLTextType,
+ SPMySQLMediumTextType,
+ SPMySQLLongTextType,
+ SPMySQLTinyBlobType,
+ SPMySQLMediumBlobType,
+ SPMySQLBlobType,
+ SPMySQLLongBlobType,
+ SPMySQLBinaryType,
+ SPMySQLVarBinaryType,
+ SPMySQLEnumType,
+ SPMySQLSetType,
@"--------",
- @"DATE",
- @"DATETIME",
- @"TIMESTAMP",
- @"TIME",
- @"YEAR",
+ SPMySQLDateType,
+ SPMySQLDatetimeType,
+ SPMySQLTimestampType,
+ SPMySQLTimeType,
+ SPMySQLYearType,
@"--------",
- @"GEOMETRY",
- @"POINT",
- @"LINESTRING",
- @"POLYGON",
- @"MULTIPOINT",
- @"MULTILINESTRING",
- @"MULTIPOLYGON",
- @"GEOMETRYCOLLECTION",
- nil] retain];
-
+ SPMySQLGeometryType,
+ SPMySQLPointType,
+ SPMySQLLineStringType,
+ SPMySQLPolygonType,
+ SPMySQLMultiPointType,
+ SPMySQLMultiLineStringType,
+ SPMySQLMultiPolygonType,
+ SPMySQLGeometryCollectionType] retain];
+
[fieldValidation setFieldTypes:typeSuggestions];
// Add observers for document task activity