function rules_update_7204

Add a table for rules-config tags.

File

./rules.install, line 371

Code

function rules_update_7204() {
    if (!db_table_exists('rules_tags')) {
        $schema['rules_tags'] = array(
            'fields' => array(
                'id' => array(
                    'type' => 'int',
                    'unsigned' => TRUE,
                    'not null' => TRUE,
                    'description' => 'The primary identifier of the configuration.',
                ),
                'tag' => array(
                    'type' => 'varchar',
                    'length' => '255',
                    'not null' => TRUE,
                    'description' => 'The tag string associated with this configuration',
                ),
            ),
            'primary key' => array(
                'id',
                'tag',
            ),
            'foreign keys' => array(
                'table' => 'rules_config',
                'columns' => array(
                    'id' => 'id',
                ),
            ),
        );
        db_create_table('rules_tags', $schema['rules_tags']);
    }
}