Hi,
In my .install file, I've got the following schema:
function tcmb_schema() {
$schema['tcmb'] = array(
'description' => 'Tcmb exchange rates',
'fields' => array(
'currency' => array(
'description' => 'Tcmb currency codes',
'type' => 'varchar',
'length' => 3,
),
'updated' => array(
'description' => 'Tcmb exchange rates date',
'type' => 'date',
),
'buying' => array(
'description' => 'Tcmb exchange buying rate',
'type' => 'numeric',
'precision' => 6,
'scale' => 4,
),
'selling' => array(
'description' => 'Tcmb exchange selling rate',
'type' => 'numeric',
'precision' => 6,
'scale' => 4,
),
),
);
return $schema;
}
and in my hook_install implementation, I do
if (!db_table_exists('tcmb')) {
drupal_install_schema('tcmb');
}
However, I am getting the following errors when I enable it:
WD php: PDOException: SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that [error]
corresponds to your MySQL server version for the right syntax to use near 'DEFAULT NULL COMMENT 'Tcmb exchange rates date',
`buying` DECIMAL(6, 4) DEFAULT' at line 3: CREATE TABLE {tcmb} (