1 system.install system_update_1004()

Create the "state" table for the state storage system.

Related topics

File

core/modules/system/system.install, line 1758
Install, update and uninstall functions for the system module.

Code

function system_update_1004() {
  if (!db_table_exists('state')) {
    $schema = array(
      'description' => 'Stores environment-specific state values.',
      'fields' => array(
        'name' => array(
          'description' => 'The name of the state.',
          'type' => 'varchar',
          'length' => 128,
          'not null' => TRUE,
          'default' => '',
        ),
        'value' => array(
          'description' => 'The value of the state.',
          'type' => 'blob',
          'not null' => TRUE,
          'size' => 'big',
        ),
      ),
      'primary key' => array('name'),
    );
    db_create_table('state', $schema);
  }
}