Download & Extend

Schema exports MySQL enums as 'type' => 'enum' when the core Schema API doesn't support it

Project:Schema
Version:6.x-1.7
Component:Code
Category:bug report
Priority:normal
Assigned:Unassigned
Status:active

Issue Summary

I am making a module, and created a MySQL table with a field of type ENUM. I then went to admin/build/schema/inspect and copied the generated schema for my table, which included this:

<?php
  $schema
['cscontent_destinations'] = array(
 
'description' => t('Information about content destinations for cscontent module.'),
 
'fields' => array(
   
'type' => array(
     
'description' => t('What kind of destination is this going to?'),
     
'type' => 'enum',
     
'not null' => TRUE,
    ),
);
?>

You can see the 'type' => 'enum', which is not supported by the core scheme API. This should probably default to an int, or give a warning that enum is not supported by core.