Создать таблицу в БД.
Пишу модуль по созданию каталога книг. Создаю таблицу в БД элементарную, однако почему то не создается.
Прилагаю код .install. Сведущие люди подскажите в чем загвоздка
$schema['bookform'] = array(
'description' => 'DB for books.',
'fields' => array(
'BookName' => array(
'description' => '',
'type' => 'text',
'size' => 'small',
'length' => 32,
'not null' => TRUE,
'default' => ''),
'AuthorName' => array(
'description' => '',
'type' => 'text',
'size' => 'small',
'length' => 32,
'not null' => TRUE,
'default' => ''),
'Description' => array(
'description' => '',
'type' => 'text',
'size' => 'medium',
'length' => 32,
'not null' => TRUE,
'default' => ''),
'indexes' => array(
'bookfrom_BookName' => 'BookName',
'bookfrom_BookName' => 'AuthorName',
'bookfrom_BookName' => 'Description',),
),
'primary key' => array('BookName'),
);
return $schema;
}
function bookform_install() {
drupal_install_schema('bookform');
}
function bookform_uninstall() {
drupal_uninstall_schema('bookform');
}