diff options
author | Brion Vibber <brion@pobox.com> | 2010-10-07 16:49:49 -0700 |
---|---|---|
committer | Brion Vibber <brion@pobox.com> | 2010-10-07 16:49:49 -0700 |
commit | 14e4f50f2999e0bf160ec90a5b26b29b48fcf776 (patch) | |
tree | e74bd20b19376b2f61e89930233d27a714481fe2 /lib/schema.php | |
parent | 82e9a2eee8ca7b71f6ab81f6c787997e01b75492 (diff) |
Some cleanup on detecting types
Diffstat (limited to 'lib/schema.php')
-rw-r--r-- | lib/schema.php | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/lib/schema.php b/lib/schema.php index d20bced4a..5868627ed 100644 --- a/lib/schema.php +++ b/lib/schema.php @@ -583,6 +583,13 @@ class Schema return $table; } + + function isNumericType($type) + { + $type = strtolower($type); + $known = array('int', 'serial', 'numeric'); + return in_array($type, $known); + } } class SchemaTableMissingException extends Exception |