diff options
author | Stuart Connolly <stuart02@gmail.com> | 2014-01-14 23:04:05 +0000 |
---|---|---|
committer | Stuart Connolly <stuart02@gmail.com> | 2014-01-14 23:04:05 +0000 |
commit | f8a9ce93bcf9ee3db418c371106c9eb87d8b61d0 (patch) | |
tree | 7ddfd5214bfd19c49295a7809a91c39880c1e639 /Source/SPTableStructure.m | |
parent | e1ac0ded1503cca04267a452004e895f6f673894 (diff) | |
download | sequelpro-f8a9ce93bcf9ee3db418c371106c9eb87d8b61d0.tar.gz sequelpro-f8a9ce93bcf9ee3db418c371106c9eb87d8b61d0.tar.bz2 sequelpro-f8a9ce93bcf9ee3db418c371106c9eb87d8b61d0.zip |
Use data type constants.
Diffstat (limited to 'Source/SPTableStructure.m')
-rw-r--r-- | Source/SPTableStructure.m | 93 |
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 |