wiki:DespoinaLog/2010/12/09

Version 3 (modified by antonak, 13 years ago) (diff)

--

Inconsistency with biobank table (pheno & gcc project)

problem:

The bbmri.xml describes the table as follows :
<entity name="Biobank" extends="Panel">
<description>Describes one biobank cohort</description>
<field name="Acronym" nillable="true" description="Acronym for this
biobank" />
<field name="Institutes" nillable="true" type="mref"
xref_entity="Institute" mref_name="BiobankInstitute"
description="Institute that are custodian of this biobank" />
<field name="Publications" type="mref" xref_entity="Publication"
description="Publications for this biobank" />
<field name="Category" type="xref" xref_entity="OntologyTerm" />
<field name="Type" type="enum" enum_options="[core,support,other]" />
<field name="Contacts" type="mref" xref_entity="Contact"
mref_name="BiobankContact" description="Contact for this biobank" />
<field name="Topics" type="mref" xref_entity="OntologyTerm" />
<field name="Materials" type="mref" xref_entity="OntologyTerm" />
<field name="Size" nillable="true" />
<field name="LastUpdate" type="date" auto="true" />
<field name="Description" type="text" nillable="true" />
</entity>

Similarly the BBMRIupdateDatabase tries to create these fields. But
the created table in DB is missing the fields:

Institutes (mref), Publications(mref), Contacts (mref), Topics
(mref), Materials (mref).

Is this how was supposed to work? Because it causes a problem in mysql
input from the previous scheme (in pheno).

Solution

  • create new table biobank from pheno project as follows:

mysql> create table biobank_new select Acronym, Category, Type, Size, LastUpdate, Description, id from biobank ;

(only fields that exist in biobank in gcc project)

  • Dump and insert new table in gcc project.
    • $ mysqldump5 -u root -p bbmri_old biobank_new > biobank_new.mysql 
    • mysql5 -u root -p bbmri < biobank_new.mysql
  • Edit