summaryrefslogtreecommitdiff
path: root/lib/mysqlschema.php
diff options
context:
space:
mode:
authorBrion Vibber <brion@pobox.com>2010-10-18 17:21:12 -0700
committerBrion Vibber <brion@pobox.com>2010-10-18 17:21:12 -0700
commita923ef971912e7d095cd4cae335abb9095930ecb (patch)
treef6177c4c226c58a50d9c3effa99b656ffca62fce /lib/mysqlschema.php
parente44f1fe989f95e915229664891053bddb7aef356 (diff)
Drop reverseTypeMap from schemas; we're now doing the forward-mapping on the canonical def before comparing
Diffstat (limited to 'lib/mysqlschema.php')
-rw-r--r--lib/mysqlschema.php38
1 files changed, 0 insertions, 38 deletions
diff --git a/lib/mysqlschema.php b/lib/mysqlschema.php
index 25f0e52f1..9785deb66 100644
--- a/lib/mysqlschema.php
+++ b/lib/mysqlschema.php
@@ -96,13 +96,6 @@ class MysqlSchema extends Schema
// warning -- 'unsigned' attr on numbers isn't given in DATA_TYPE and friends.
// It is stuck in on COLUMN_TYPE though (eg 'bigint(20) unsigned')
- /*
- list($type, $size) = $this->reverseMapType($row['DATA_TYPE']);
- $field['type'] = $type;
- if ($size !== null) {
- $field['size'] = $size;
- }
- */
$field['type'] = $type = $row['DATA_TYPE'];
if ($type == 'char' || $type == 'varchar') {
@@ -487,37 +480,6 @@ class MysqlSchema extends Schema
return $type;
}
- /**
- * Map a MySQL native type back to an independent type + size
- *
- * @param string $type
- * @return array ($type, $size) -- $size may be null
- */
- /*
- protected function reverseMapType($type)
- {
- $type = strtolower($type);
- $map = array(
- 'decimal' => array('numeric', null),
- 'tinyint' => array('int', 'tiny'),
- 'smallint' => array('int', 'small'),
- 'mediumint' => array('int', 'medium'),
- 'bigint' => array('int', 'big'),
- 'tinyblob' => array('blob', 'tiny'),
- 'mediumblob' => array('blob', 'medium'),
- 'longblob' => array('blob', 'long'),
- 'tinytext' => array('text', 'tiny'),
- 'mediumtext' => array('text', 'medium'),
- 'longtext' => array('text', 'long'),
- );
- if (isset($map[$type])) {
- return $map[$type];
- } else {
- return array($type, null);
- }
- }
- */
-
function typeAndSize($column)
{
if ($column['type'] == 'enum') {