Hi, i18nstrings module adds a new field "status" in locales_target table.

I use schema module and got a report from it that sth is wrong with this field.

I have tracked the issue:

Example from API docs: (note -> $schema['users']['fields']['timezone_id'] = array( )


<?php
function hook_schema_alter(&$schema) {
  // Add field to existing schema.
  $schema['users']['fields']['timezone_id'] = array(
    'type' => 'int',
    'not null' => TRUE,
    'default' => 0,
    'description' => t('Per-user timezone configuration.'),
  );
}
?>

and here is the same in .install file of i18nstrings : (note -> $schema['locales_target']['status'] = array( )

function i18nstrings_schema_alter(&$schema) {
  // Add index for textgroup and location to {locales_source}.
  $schema['locales_source']['indexes']['textgroup_location'] = array(array('textgroup', 30), 'location');
  // Add field for tracking whether translations need updating.
  $schema['locales_target']['status'] = array(
    'description' => t('A boolean indicating whether this translation needs to be updated.'),
    'type' => 'int',
    'not null' => TRUE,
    'default' => 0,
  );
}

['fields'] is missing - it should be

$schema['locales_target']['fields']['status'] = array(

instead of

$schema['locales_target']['status'] = array(

No need for a patch here - just manually add it - I have tested this fix and it works fine in schema module - so marking this as RTBC.

Comments

jvieille’s picture

Same problem
The fix is OK
Must be included in the next dev/release
Thanks

rsvelko’s picture

come on then :)

rsvelko’s picture

bump

jose reyero’s picture

Status: Reviewed & tested by the community » Fixed

Very true. Fixed, thanks.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.