You are here

function autosave_schema in Autosave 7

Same name and namespace in other branches
  1. 5.3 autosave.install \autosave_schema()
  2. 6.2 autosave.install \autosave_schema()
  3. 6 autosave.install \autosave_schema()
  4. 7.2 autosave.install \autosave_schema()

Implements hook_schema() ().

File

./autosave.install, line 40
Install, update and uninstall functions for the autosave module.

Code

function autosave_schema() {
  return array(
    'autosaved_forms' => array(
      'description' => "Table to save forms in the database",
      'fields' => array(
        'form_id' => array(
          'type' => 'varchar',
          'length' => 64,
          'not null' => TRUE,
        ),
        'path' => array(
          'type' => 'varchar',
          'length' => 255,
          'not null' => TRUE,
        ),
        'uid' => array(
          'type' => 'int',
          'length' => 11,
          'not null' => TRUE,
          'default' => 0,
        ),
        'timestamp' => array(
          'type' => 'int',
          'length' => 11,
          'not null' => TRUE,
          'default' => 0,
        ),
        'serialized' => array(
          'type' => 'text',
          'not null' => TRUE,
          'size' => 'big',
        ),
      ),
      'primary key' => array(
        'form_id',
        'path',
        'uid',
      ),
    ),
  );
}