You are here

function flexiform_update_7004 in Flexiform 7

Add the path fields to the flexiform table.

File

./flexiform.install, line 271
Sets up the base table for our entity and a table to store information about the entity types.

Code

function flexiform_update_7004() {
  db_add_field('flexiform', 'path', array(
    'type' => 'varchar',
    'length' => 255,
    'not null' => FALSE,
    'description' => 'The path to a new submission of this form.',
  ));
  db_add_field('flexiform', 'edit_path', array(
    'type' => 'varchar',
    'length' => 255,
    'not null' => FALSE,
    'description' => 'The path to an edit version of this form.',
  ));
  db_update('flexiform')
    ->expression('path', "CONCAT('flexiform/', form)")
    ->expression('edit_path', "CONCAT('flexiform/', form, '/%')")
    ->execute();
}