Upgrade the {filter_formats} table and rename it to {filter_format}.

Related topics

File

modules/filter/filter.install, line 172
Install, update, and uninstall functions for the Filter module.

Code

function filter_update_7000() {
  db_rename_table('filter_formats', 'filter_format');

  // Add the new {filter_format}.status and {filter_format}.weight column.
  db_add_field('filter_format', 'status', array(
    'type' => 'int',
    'unsigned' => TRUE,
    'not null' => TRUE,
    'default' => 1,
    'size' => 'tiny',
    'description' => 'The status of the text format. (1 = enabled, 0 = disabled)',
  ));
  db_add_field('filter_format', 'weight', array(
    'type' => 'int',
    'not null' => TRUE,
    'default' => 0,
    'description' => 'Weight of text format to use when listing.',
  ), array(
    'indexes' => array(
      'status_weight' => array(
        'status',
        'weight',
      ),
    ),
  ));
}