0
I have created a custom form which stores the name of the book and the type of the book. I have created the mymodule.install file but I cant install the module. It shows the following error,
Notice: Undefined index: :normal in Drupal\Core\Database\Driver\mysql\Schema->processField()
I have pasted the .install file, please let me know where the syntax error is:
<?php
function mymodule_schema() {
$schema['mymodule'] = [
'description' => 'Stores book name and book type',
'fields' => [
'id' => [
'description' => 'The primary identifier for the record.',
'type' => 'serial',
'unsigned' => TRUE,
'not null' => TRUE,
],
'book_name' => [
'description' => 'Name of the book.',
'type' => 'varchar',
'length' => 255,
'not null' => TRUE,
],
'book_type' => [
'description' => 'The type of book.',
'type' => 'varchar',
'length' => 255,
'not null' => TRUE,
],
'primary key' => ['id'],
],
];
return $schema;
}