Skip to content

Instantly share code, notes, and snippets.

@johnrobertwilson
Created August 2, 2011 15:51
Show Gist options
  • Save johnrobertwilson/1120496 to your computer and use it in GitHub Desktop.
Save johnrobertwilson/1120496 to your computer and use it in GitHub Desktop.
Getting wierd Incorrect Table definition when trying to install this skeleton module.. does anything look wrong?
<?php
// $Id$
/**
* Implementation of hook_schema()
*
* TODO: Describe the module's data model
*
*/
function tcb_entities_schema() {
$schema = array();
$schema['tcb_subject'] = array(
'description' => 'Subject',
'fields' => array(
'subject_id' => array(
'description' => '',
'type' => 'serial',
'not null' => TRUE,
),
'title' => array(
'description' => '',
'type' => 'char',
'length' => 200,
'not null' => TRUE,
),
),
'primary_key' => array('subject_id'),
);
return $schema;
}
/**
* Implementation of hook_install()
*
* Perform initial setup tasks
*
*/
function tcb_entities_install() {
}
/**
* Implements hook_uninstall().
*/
function tcb_entities_uninstall() {
drupal_uninstall_schema('tcb_entities');
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment