You are here

function forena_update_7202 in Forena Reports 7.2

Same name and namespace in other branches
  1. 7.3 forena.install \forena_update_7202()

Add language column

File

./forena.install, line 135
Installation api for module

Code

function forena_update_7202() {
  db_add_field('forena_reports', 'language', array(
    'type' => 'varchar',
    'length' => 30,
    'not null' => TRUE,
    'default' => 'en',
  ));
  db_query("update {forena_reports} set language='en'");
  db_drop_primary_key('forena_reports');
  db_add_primary_key('forena_reports', array(
    'report_name',
    'language',
  ));
}