What's the syntax to apply hook_schema() in .install file? I want to build a installable module. Let's assume the module name will be bluedog_calculator. I have already created other required files like bluedog_calculator.info and bluedog_calculator.module. Now I am trying to use hook_schema() and whenever i am trying to use drush dre bluedog_calculator -y, Konsole gives me an error as follows: 


  SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax;   [error]
  check the manual that corresponds to your MariaDB server version for the right syntax to use near 'unsigned NOT NULL COMMENT.


I am not sure what is the right syntax for applying this hook.

My code is

function bluedog_calculator_schema(){
    $schema['bluedog_calculator_machine'] = array(
    'description' =&gt; 'TODO: please describe this table!',
    'fields' =&gt; array(
      'id' =&gt; array(
        'description' =&gt; 'TODO: please describe this field!',
        'type' =&gt; 'serial',
        'not null' =&gt; TRUE,
        ),
      'name' =&gt; array(
        'description' =&gt; 'TODO: please describe this field!',
        'type' =&gt; 'varchar',
        'length' =&gt; '100',
        'not null' =&gt; TRUE,
        ),
      'speed' =&gt; array(
        'description' =&gt; 'TODO: please describe this field!',
        'type' =&gt; 'float',
        'not null' =&gt; TRUE,
        ),
      'cost' =&gt; array(
        'description' =&gt; 'TODO: please describe this field!',
        'type' =&gt; 'float',
        'not null' =&gt; TRUE,
        ),
      'image' =&gt; array(
        'description' =&gt; 'TODO: please describe this field!',
        'type' =&gt; 'varchar',
        'length' =&gt; '255',
        'not null' =&gt; TRUE,
        ),
      'web_link' =&gt; array(
        'description' =&gt; 'TODO: please describe this field!',
        'type' =&gt; 'text',
        'unsigned' =&gt; TRUE,
        'not null' =&gt; TRUE,
        ),
      'is_default' =&gt; array(
        'description' =&gt; 'TODO: please describe this field!',
        'type' =&gt; 'int',
        'size' =&gt; 'tiny',
        'not null' =&gt; TRUE,
        'default' =&gt; 0,
        ),
      ),
    'primary key' =&gt; array('id'),
);

return $schema;
}
The only place you use 'unsigned' is in this block:

'web_link' =&gt; array(
  'description' =&gt; 'TODO: please describe this field!',
  'type' =&gt; 'text',
  'unsigned' =&gt; TRUE,
  'not null' =&gt; TRUE,
),


'unsigned' does not apply to text columns. Try removing that line from the web_link column definition. https://api.drupal.org/api/drupal/includes!database!schema.inc/group/schemaapi/7.x has useful reference on this.

(The docs state that unsigned is ignored for other types, but it seems the error is in that chunk, so I'd certainly try removing it in case your database engine is not ignoring it.)