Download & Extend

PostgreSQL: PDOException during install of module translation skills

Project:Translation Management Tool
Version:7.x-1.x-dev
Component:Translator: Local
Category:bug report
Priority:normal
Assigned:Unassigned
Status:closed (fixed)

Issue Summary

I get this Exception during install of module translation skills on Postgres (clean install):

PDOException: SQLSTATE[42P07]: Duplicate table: 7 FEHLER: Relation »field_data_tmgmt_translation_skills_tmgmt_translation_skills_la« existiert bereits: CREATE INDEX "field_data_tmgmt_translation_skills_tmgmt_translation_skills_language_to_idx" ON {field_data_tmgmt_translation_skills} ("tmgmt_translation_skills_language_to"); Array ( ) in db_create_table() (line 2688 of W:\workspace\drupal7\includes\database\database.inc).

Translation: existiert bereits == allready exists

It seems that the index names are too long for postgres.
To install the module I disabled '$statements[] = $this->_createIndexSql($name, $key_name, $key); '. (just for testing purpose)

Comments

#1

You could try to rename the index to remove the language_ prefix and try again. They're not needed anyway.

Still a bit fragile, but could work.

If not, then we have to short the field name.

#2

I could try, if I would know how... I am really new on module developing on drupal...

#3

<?php
   
'indexes' => array(
     
'language_from' => array('language_from'),
     
'language_to' => array('language_to'),
     
'language_combination' => array('language_from', 'language_to'),
    ),
?>

Those are the index definitions.

I actually forgot to fix this, we just need the last one. So remove the from and to lines and shorten the last one to just language. That should fix your error.

#4

Ok that worked.

thank you!

AttachmentSizeStatusTest resultOperations
tmgmt-translation-skills-indexes.patch827 bytesIdlePASSED: [[SimpleTest]]: [MySQL] 2,104 pass(es).View details

#5

Status:active» needs work

No need to comment it out, just remove that stuff. We can always get the old version back using git if we have to.

And make sure to set an issue to needs review if you upload patch.

#6

Status:needs work» needs review
AttachmentSizeStatusTest resultOperations
tmgmt-translation-skills-indexes-2.patch724 bytesIdlePASSED: [[SimpleTest]]: [MySQL] 2,019 pass(es).View details

#7

Status:needs review» fixed

Thanks, commited and pushed!

#8

Status:fixed» closed (fixed)

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

nobody click here