Commit 591dc3f4 authored by Tiago Grego's avatar Tiago Grego
Browse files

patched ontology test schema

parent 43251e25
......@@ -9,7 +9,7 @@
10 patch patch_72_73_b.sql|meta \N
12 patch patch_73_74_a.sql|schema_version \N
14 patch patch_74_75_a.sql|schema_version \N
15 schema_version 95 \N
15 schema_version 97 \N
16 patch patch_75_76_a.sql|schema_version \N
17 patch patch_76_77_a.sql|schema_version \N
18 patch patch_77_78_a.sql|schema_version \N
......@@ -37,3 +37,6 @@
40 patch patch_92_93_a.sql|schema_version \N
41 patch patch_93_94_a.sql|schema_version \N
42 patch patch_94_95_a.sql|schema_version \N
43 patch patch_95_96_a.sql|schema_version \N
44 patch patch_95_96_b.sql|term_ontology_update \N
45 patch patch_96_97_a.sql|schema_version \N
......@@ -129,26 +129,29 @@ CREATE TABLE `closure` (
`confident_relationship` tinyint(1) NOT NULL DEFAULT '0',
PRIMARY KEY (`closure_id`),
UNIQUE KEY `child_parent_idx` (`child_term_id`,`parent_term_id`,`subparent_term_id`,`ontology_id`),
KEY `parent_subparent_idx` (`parent_term_id`,`subparent_term_id`)
KEY `parent_subparent_idx` (`parent_term_id`,`subparent_term_id`),
KEY `ix_closure_subparent_term_id` (`subparent_term_id`),
KEY `ix_closure_ontology_id` (`ontology_id`)
) ENGINE=MyISAM AUTO_INCREMENT=1453438 DEFAULT CHARSET=latin1;
CREATE TABLE `meta` (
`meta_id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`meta_key` varchar(64) NOT NULL,
`meta_value` varchar(128) DEFAULT NULL,
`meta_key` varchar(64) CHARACTER SET latin1 NOT NULL,
`meta_value` varchar(128) CHARACTER SET latin1 DEFAULT NULL,
`species_id` int(1) unsigned DEFAULT NULL,
PRIMARY KEY (`meta_id`),
UNIQUE KEY `key_value_idx` (`meta_key`,`meta_value`)
) ENGINE=MyISAM AUTO_INCREMENT=43 DEFAULT CHARSET=latin1;
) ENGINE=MyISAM AUTO_INCREMENT=46 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
CREATE TABLE `ontology` (
`ontology_id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`name` varchar(64) NOT NULL,
`namespace` varchar(64) NOT NULL,
`data_version` varchar(64) DEFAULT NULL,
`name` varchar(64) CHARACTER SET latin1 NOT NULL,
`namespace` varchar(64) CHARACTER SET latin1 NOT NULL,
`data_version` varchar(64) CHARACTER SET latin1 DEFAULT NULL,
`title` varchar(255) CHARACTER SET latin1 DEFAULT NULL,
PRIMARY KEY (`ontology_id`),
UNIQUE KEY `name_namespace_idx` (`name`,`namespace`)
) ENGINE=MyISAM AUTO_INCREMENT=8 DEFAULT CHARSET=latin1;
) ENGINE=MyISAM AUTO_INCREMENT=8 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
CREATE TABLE `relation` (
`relation_id` int(10) unsigned NOT NULL AUTO_INCREMENT,
......@@ -159,7 +162,10 @@ CREATE TABLE `relation` (
`ontology_id` int(10) unsigned NOT NULL,
PRIMARY KEY (`relation_id`),
UNIQUE KEY `child_parent_idx` (`child_term_id`,`parent_term_id`,`relation_type_id`,`intersection_of`,`ontology_id`),
KEY `parent_idx` (`parent_term_id`)
KEY `parent_idx` (`parent_term_id`),
KEY `ix_relation_parent_term_id` (`parent_term_id`),
KEY `ix_relation_relation_type_id` (`relation_type_id`),
KEY `ix_relation_ontology_id` (`ontology_id`)
) ENGINE=MyISAM AUTO_INCREMENT=68750 DEFAULT CHARSET=latin1;
CREATE TABLE `relation_type` (
......@@ -171,35 +177,36 @@ CREATE TABLE `relation_type` (
CREATE TABLE `subset` (
`subset_id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`name` varchar(64) NOT NULL,
`definition` varchar(128) NOT NULL,
`name` varchar(64) CHARACTER SET latin1 NOT NULL,
`definition` varchar(128) CHARACTER SET latin1 NOT NULL,
PRIMARY KEY (`subset_id`),
UNIQUE KEY `name_idx` (`name`)
) ENGINE=MyISAM AUTO_INCREMENT=18 DEFAULT CHARSET=latin1;
) ENGINE=MyISAM AUTO_INCREMENT=18 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
CREATE TABLE `synonym` (
`synonym_id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`term_id` int(10) unsigned NOT NULL,
`name` mediumtext COLLATE utf8_swedish_ci NOT NULL,
`type` enum('EXACT','BROAD','NARROW','RELATED') COLLATE utf8_swedish_ci DEFAULT NULL,
`dbxref` varchar(256) COLLATE utf8_swedish_ci NOT NULL,
`name` mediumtext CHARACTER SET utf8 COLLATE utf8_swedish_ci NOT NULL,
`type` enum('EXACT','BROAD','NARROW','RELATED') CHARACTER SET utf8 COLLATE utf8_swedish_ci DEFAULT NULL,
`dbxref` varchar(256) CHARACTER SET utf8 COLLATE utf8_swedish_ci NOT NULL,
PRIMARY KEY (`synonym_id`),
UNIQUE KEY `term_synonym_idx` (`term_id`,`synonym_id`),
KEY `name_idx` (`name`(50))
) ENGINE=MyISAM AUTO_INCREMENT=104283 DEFAULT CHARSET=utf8 COLLATE=utf8_swedish_ci;
) ENGINE=MyISAM AUTO_INCREMENT=104283 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
CREATE TABLE `term` (
`term_id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`ontology_id` int(10) unsigned NOT NULL,
`subsets` text,
`accession` varchar(64) NOT NULL,
`name` varchar(255) NOT NULL,
`definition` text,
`subsets` text CHARACTER SET latin1,
`accession` varchar(64) CHARACTER SET latin1 NOT NULL,
`name` varchar(255) CHARACTER SET latin1 NOT NULL,
`definition` text CHARACTER SET latin1,
`is_root` int(11) DEFAULT NULL,
`is_obsolete` int(11) DEFAULT NULL,
`iri` text CHARACTER SET latin1,
PRIMARY KEY (`term_id`),
UNIQUE KEY `accession_idx` (`accession`),
UNIQUE KEY `ontology_acc_idx` (`ontology_id`,`accession`),
KEY `name_idx` (`name`)
) ENGINE=MyISAM AUTO_INCREMENT=44356 DEFAULT CHARSET=latin1;
) ENGINE=MyISAM AUTO_INCREMENT=44356 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment