18.10.2016 Views

Drupal 7 Module Development

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

'fields' => array(<br />

'aid' => array(<br />

'description' => 'The {artwork} this version belongs to.',<br />

'type' => 'int',<br />

'unsigned' => TRUE,<br />

'not null' => TRUE,<br />

'default' => 0,<br />

),<br />

'vid' => array(<br />

'description' => 'The primary identifier for this version.',<br />

'type' => 'serial',<br />

'unsigned' => TRUE,<br />

'not null' => TRUE,<br />

),<br />

'title' => array(<br />

'description' => 'The title of this version.',<br />

'type' => 'varchar',<br />

'length' => 255,<br />

'not null' => TRUE,<br />

'default' => '',<br />

),<br />

'created' => array(<br />

'description' =><br />

'The Unix timestamp when the artwork was created.',<br />

'type' => 'int',<br />

'not null' => TRUE,<br />

'default' => 0,<br />

),<br />

),<br />

'indexes' => array(<br />

'aid' => array('aid'),<br />

),<br />

'primary key' => array('vid'),<br />

'foreign keys' => array(<br />

'artwork' => array(<br />

'table' => 'artwork',<br />

'columns' => array(<br />

'aid' => 'aid',<br />

),<br />

),<br />

),<br />

);<br />

Chapter 6<br />

[ 155 ]

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!