Commit 66ac3a51 authored by Ivan Berezhnov's avatar Ivan Berezhnov Committed by Joseph Olstad
Browse files

Issue #2200647 by Ivan Berezhnov, attiks, nightlife2008: DB error: Out of...

Issue #2200647 by Ivan Berezhnov, attiks, nightlife2008: DB error: Out of range value for column 'objectindex'
parent 03ed5896
Loading
Loading
Loading
Loading
+10
Changes for i18n_string/i18n_string.inc: 10 added lines, 0 removed lines.
Original line number Diff line number Diff line
@@ -703,9 +703,19 @@ class i18n_string_textgroup_default {
      // Create source string so we get an lid
      $this->save_source($string);
    }

    // Convert objectid to objectkey if it's numeric.
    if (!isset($string->objectkey)) {
      if (is_numeric($string->objectid)) {
        $string->objectkey = (int)$string->objectid;
      }
    }

    // Make sure objectkey is numeric.
    if (!is_numeric($string->objectkey)) {
      $string->objectkey = 0;
    }

    if (!isset($string->format)) {
      $string->format = '';
    }
+12
Changes for i18n_string/i18n_string.install: 12 added lines, 0 removed lines.
Original line number Diff line number Diff line
@@ -94,6 +94,8 @@ function i18n_string_schema() {
      ),
      'objectindex' => array(
        'type' => 'int',
        'size' => 'big',
        'length' => 20,
        'not null' => TRUE,
        'default' => 0,
        'description' => 'Integer value of Object ID.',
@@ -245,6 +247,16 @@ function i18n_string_update_7002() {
  }
}

/**
 * Change objectindex from int to bigint.
 */
function i18n_string_update_7003() {
  db_change_field('i18n_string', 'objectindex', 'objectindex', array(
    'type' => 'int',
    'size' => 'big',
    'length' => 20,
  ));
}

/**
 * Notes for update script