You are here

function autosave_schema in Autosave 6.2

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

Implementation of hook_schema()

File

./autosave.install, line 27

Code

function autosave_schema() {
  return array(
    'autosaved_forms' => array(
      'description' => 'Saves the input (POST) contents of partially filled forms for restoration by the autosave module.',
      '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',
      ),
    ),
  );
}