* When importing bbmri mysql table , table structures change --> exception . * [http://www.abbeyworkshop.com/howto/lamp/MySQL_Export_Backup/index.html Try to export / import one table at a time] : mysqldump5 -u root -p bbmri biobank >biobank.mysql / mysqldump5 -u root -p bbmri_old biobank >biobank.mysql / mysql5 -u root -p bbmri < biobank.mysql / mysql5 -u root -p bbmri < ontologyTerm.mysql * org.molgenis.framework.db.!DatabaseException: Unknown column '!OntologyTerm.!__Type' in 'where clause' * Was this produced after the import ? (generate gcc, update db -> test if it is shown --> import -> test if it's there) * So this is the '''PROBLEM ''' for !OntologyTerm : * * mysql> describe !OntologyTerm; * +---------------+--------------------------------+------+-----+---------+----------------+ * | Field | Type | Null | Key | Default | Extra | * +---------------+--------------------------------+------+-----+---------+----------------+ * | id | int(11) | NO | PRI | NULL | auto_increment | * | name | varchar(127) | NO | | NULL | | * | !__Type | enum('!OntologyTerm','Species') | NO | | NULL | | * | ontology | int(11) | YES | MUL | NULL | | * | termAccession | varchar(255) | YES | | NULL | | * | definition | varchar(255) | YES | | NULL | | * | termPath | varchar(1024) | YES | | NULL | | * +---------------+--------------------------------+------+-----+---------+----------------+ * 7 rows in set (0.04 sec) * * mysql> describe bbmri_old.!OntologyTerm; * +---------------+--------------+------+-----+---------+----------------+ * | Field | Type | Null | Key | Default | Extra | * +---------------+--------------+------+-----+---------+----------------+ * | id | int(11) | NO | PRI | NULL | auto_increment | * | term | varchar(255) | NO | | NULL | | * | ontology | int(11) | YES | MUL | NULL | | * | termAccession | varchar(255) | YES | | NULL | | * | definition | varchar(255) | YES | | NULL | | * +---------------+--------------+------+-----+---------+----------------+ * 5 rows in set (0.01 sec) * '''SOLUTION''' * mysql> alter table bbmri_old.!OntologyTerm change term name varchar(255) ; * Query OK, 164 rows affected (0.32 sec) * Records: 164 Duplicates: 0 Warnings: 0 * * mysql> alter table bbmri_old.!OntologyTerm add column !__Type enum('!OntologyTerm','Species') ; * Query OK, 164 rows affected (0.11 sec) * Records: 164 Duplicates: 0 Warnings: 0 * * mysql> alter table bbmri_old.!OntologyTerm add column termPath varchar(1024); * * * * mysql> describe biobanks; * ERROR 1146 (42S02): Table 'bbmri.biobanks' doesn't exist * mysql> describe biobank; * +-------------+--------------------------------+------+-----+---------+-------+ * | Field | Type | Null | Key | Default | Extra | * +-------------+--------------------------------+------+-----+---------+-------+ * | Acronym | varchar(255) | YES | | NULL | | * | Category | int(11) | NO | MUL | NULL | | * | Type | enum('core','support','other') | NO | | NULL | | * | Size | varchar(255) | YES | | NULL | | * | !LastUpdate | date | NO | | NULL | | * | Description | text | YES | | NULL | | * | id | int(11) | NO | PRI | NULL | | * +-------------+--------------------------------+------+-----+---------+-------+ * 7 rows in set (0.00 sec) * * mysql> describe bbmri_old.biobank; * +-------------+--------------------------------+------+-----+---------+-------+ * | Field | Type | Null | Key | Default | Extra | * +-------------+--------------------------------+------+-----+---------+-------+ * | Acronym | varchar(255) | YES | | NULL | | * | Category | int(11) | NO | MUL | NULL | | * | Type | enum('core','support','other') | NO | | NULL | | * | Size | varchar(255) | YES | | NULL | | * | !LastUpdate | date | NO | | NULL | | * | Description | text | YES | | NULL | | * | id | int(11) | NO | PRI | NULL | | * +-------------+--------------------------------+------+-----+---------+-------+ * 7 rows in set (0.00 sec) *'''Note:''' See [http://gbic.target.rug.nl/trac/molgenis/wiki/WikiFormatting WikiFormatting] and [http://gbic.target.rug.nl/trac/molgenis/wiki/TracWiki TracWiki] for help on editing wiki content.Change informationComment about this change (optional):[[BR]]Tag under: ([http://gbic.target.rug.nl/trac/molgenis/tags view all tags])[[BR]] Page is read-only Last modified by antonak, 12/08/10 13:50:50 ([http://gbic.target.rug.nl/trac/molgenis/timeline?from=2010-12-08T13%3A50%3A50%2B01%3A00&precision=second 6 minutes] ago)