You are here

function properties_sql_update_7000 in Dynamic properties 7

Update from previous development version, adds weights.

File

properties_sql/properties_sql.install, line 164
Install file for properties_sql.module

Code

function properties_sql_update_7000() {
  if (!db_field_exists('properties_category_attribute', 'weight')) {
    $schema = array(
      'description' => 'weight of the attribute in the category',
      'type' => 'int',
      'not null' => TRUE,
      'default' => 0,
    );
    db_add_field('properties_category_attribute', 'weight', $schema);
  }
  if (!db_field_exists('properties_template_category', 'weight')) {
    $schema = array(
      'description' => 'weight of category in the template',
      'type' => 'int',
      'not null' => TRUE,
      'default' => 0,
    );
    db_add_field('properties_template_category', 'weight', $schema);
  }
}