Table creation in install module returns error I am trying to create a table using a custom module in the install file:

function leave_tracker_schema() {
  $schema = array();
  $schema['leave_balance'] = array(
    'description' =&gt; t('The base table for employee leave balance.'),
    'fields' =&gt; array(
      'lid' =&gt; array(
        'description' =&gt; 'The primary identifier for a row.',
        'type' =&gt; 'serial',
        'unsigned' =&gt; TRUE,
        'not null' =&gt; TRUE),
      'eid' =&gt; array(
        'description' =&gt; 'The tocken got from employee data.',
        'type' =&gt; 'varchar',
        'length' =&gt; 255,
        'not null' =&gt; TRUE,
        'default' =&gt; 0),
      'casual' =&gt; array(
        'description' =&gt; 'The casual leave balanace of employee.',
        'type' =&gt; 'int',
        'not null' =&gt; TRUE,),
      'sick' =&gt; array(
        'description' =&gt; 'The sick leave balanace of employee.',
        'type' =&gt; 'int',
        'not null' =&gt; TRUE,),
      ),
    'indexes' =&gt; array(
      'node_changed'        =&gt; array('changed'),
      'node_created'        =&gt; array('created'),
      ),
    'primary key' =&gt; array('lid'),
    ); 
  return $schema;
}'


but this returns an error when I install the module


  'PDOException: SQLSTATE[42000]: Syntax error or access violation: 1072
  Key column 'changed' doesn't exist in table: CREATE TABLE
  {leave_balance} ( lid INT unsigned NOT NULL auto_increment COMMENT
  'The primary identifier for a row.', eid VARCHAR(255) NOT NULL
  DEFAULT 0 COMMENT 'The tocken got from employee data.', casual INT
  NOT NULL COMMENT 'The casual leave balanace of employee.', sick INT
  NOT NULL COMMENT 'The sick leave balanace of employee.', PRIMARY KEY
  (lid), INDEX node_changed (changed), INDEX node_created
  (created) ) ENGINE = InnoDB DEFAULT CHARACTER SET utf8 COMMENT 'The
  base table for employee leave balance.'; Array ( ) in
  db_create_table() (line 2720 of
  /var/www/html/cybpedia/includes/database/database.inc).'
In your indexes element you're specifying 2 columns, changed &amp; created, that don't exist. You need to have these columns added to your fields element or remove the indexes.