You are here

function media_update_7000 in D7 Media 7

Same name and namespace in other branches
  1. 7.4 media.install \media_update_7000()
  2. 7.2 media.install \media_update_7000()
  3. 7.3 media.install \media_update_7000()

Create the media_list_type table.

File

./media.install, line 266
Install, update and uninstall functions for the Media module.

Code

function media_update_7000() {
  $schema['media_list_type'] = array(
    'description' => 'Stores the user preference for whether to list as table or images.',
    'fields' => array(
      'uid' => array(
        'description' => 'The {user}.uid of the user.',
        'type' => 'int',
        'unsigned' => TRUE,
        'not null' => TRUE,
        'default' => 0,
      ),
      'type' => array(
        'description' => 'The type of display (table or images).',
        'type' => 'varchar',
        'length' => 32,
        'not null' => TRUE,
        'default' => '',
      ),
    ),
    'primary key' => array(
      'uid',
    ),
  );
  db_create_table('media_list_type', $schema['media_list_type']);
}