I'm trying to create a module for Drupal 7 and I need to create 3 tables and populate it. But first i need to create it.
In the file mymodule.install I have got
function mymodule_install() {
}
function mymodule_uninstall() {
}
function myodule_schema() {
$schema['mymodule_table'] = array(
'description' => t('First table'),
'fields' => array(
'id' => array(
'description' => t('My unique identifier'),
'type' => 'int',
'unsigned' => true,
'not null' => true,
),
'list' => array(
'description' => t('list'),
'type' => 'varchar',
'not null' => true,
),
),
'primary key' => array('id'),
);
return $schema;
}
What am I doing wrong? Every time I test the module, I disable it -> uninstall -> Performance clear cache -> enable it.
drush devel-reinstall mymodule
to quickly reinstall your module