You are here

protected function FeedsDataProcessor::baseSchema in Feeds 6

Every Feeds data table must have these elements.

1 call to FeedsDataProcessor::baseSchema()
FeedsDataProcessor::table in plugins/FeedsDataProcessor.inc
Return the data table for this feed.

File

plugins/FeedsDataProcessor.inc, line 323
Definition of FeedsDataProcessor.

Class

FeedsDataProcessor
Creates simple table records from feed items. Uses Data module.

Code

protected function baseSchema() {
  return array(
    'fields' => array(
      'feed_nid' => array(
        'type' => 'int',
        'unsigned' => TRUE,
        'not null' => TRUE,
      ),
      'id' => array(
        'type' => 'serial',
        'size' => 'normal',
        'unsigned' => TRUE,
        'not null' => TRUE,
      ),
      'timestamp' => array(
        'description' => 'The Unix timestamp for the data.',
        'type' => 'int',
        'unsigned' => TRUE,
        'not null' => FALSE,
      ),
    ),
    'indexes' => array(
      'feed_nid' => array(
        'feed_nid',
      ),
      'id' => array(
        'id',
      ),
      'timestamp' => array(
        'timestamp',
      ),
    ),
    'primary key' => array(
      '0' => 'id',
    ),
  );
}