| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253 |
- <?php
- /**
- * @file
- * Installation functionality for Mollom testing module.
- */
- /**
- * Implements hook_schema().
- */
- function mollom_test_schema() {
- $schema['mollom_test'] = array(
- 'description' => 'Stores testing data for Mollom test form.',
- 'fields' => array(
- 'mid' => array(
- 'description' => 'Primary key: Unique mollom_test entity ID.',
- 'type' => 'serial',
- 'not null' => TRUE,
- ),
- 'title' => array(
- 'description' => 'Title of the post.',
- 'type' => 'varchar',
- 'length' => 255,
- 'not null' => TRUE,
- 'default' => '',
- ),
- 'body' => array(
- 'description' => 'Body of the post.',
- 'type' => 'text',
- 'not null' => TRUE,
- ),
- 'status' => array(
- 'description' => 'Publishing status.',
- 'type' => 'int',
- 'size' => 'tiny',
- 'not null' => TRUE,
- 'default' => 1,
- ),
- ),
- 'primary key' => array('mid'),
- );
- return $schema;
- }
- /**
- * Implements hook_uninstall().
- */
- function mollom_test_uninstall() {
- db_delete('variable')
- ->condition('name', db_like('mollom_test.') . '%', 'LIKE')
- ->execute();
- }
|