View source
<?php
function autosave_enable() {
drupal_set_message(t('Autosave module successfully installed. Please review the <a href="@settings">configuration settings</a>.', array(
'@settings' => url('admin/settings/autosave'),
)));
}
function autosave_install() {
drupal_install_schema('autosave');
}
function autosave_uninstall() {
drupal_uninstall_schema('autosave');
}
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',
),
),
);
}