Commit 997e6855 authored by Magali Ruffier's avatar Magali Ruffier
Browse files

test databases in sync with latest schema

parent 856a5aa2
......@@ -14,6 +14,8 @@
70 \N patch patch_74_75_b.sql|transcript_source
71 \N patch patch_74_75_c.sql|add_genome_statistics
72 \N patch patch_74_75_d.sql|default_transcript_source
73 \N patch patch_74_75_e.sql|unique_attrib_key
74 \N patch patch_74_75_f.sql|longer_code
1 \N schema_type core
2 \N schema_version 75
8 1 assembly.accession GCA_000292705.1
......
......@@ -98,7 +98,7 @@ CREATE TABLE `associated_xref` (
CREATE TABLE `attrib_type` (
`attrib_type_id` smallint(5) unsigned NOT NULL AUTO_INCREMENT,
`code` varchar(50) DEFAULT NULL,
`code` varchar(20) NOT NULL DEFAULT '',
`name` varchar(255) NOT NULL DEFAULT '',
`description` text,
PRIMARY KEY (`attrib_type_id`),
......@@ -320,6 +320,7 @@ CREATE TABLE `gene_attrib` (
`gene_id` int(10) unsigned NOT NULL DEFAULT '0',
`attrib_type_id` smallint(5) unsigned NOT NULL DEFAULT '0',
`value` text NOT NULL,
UNIQUE KEY `gene_attribx` (`gene_id`,`attrib_type_id`,`value`(500)),
KEY `type_val_idx` (`attrib_type_id`,`value`(40)),
KEY `val_only_idx` (`value`(40)),
KEY `gene_idx` (`gene_id`)
......@@ -468,7 +469,7 @@ CREATE TABLE `meta` (
PRIMARY KEY (`meta_id`),
UNIQUE KEY `species_key_value_idx` (`species_id`,`meta_key`,`meta_value`),
KEY `species_value_idx` (`species_id`,`meta_value`)
) ENGINE=InnoDB AUTO_INCREMENT=73 DEFAULT CHARSET=latin1;
) ENGINE=InnoDB AUTO_INCREMENT=75 DEFAULT CHARSET=latin1;
CREATE TABLE `meta_coord` (
`table_name` varchar(40) NOT NULL,
......@@ -481,6 +482,7 @@ CREATE TABLE `misc_attrib` (
`misc_feature_id` int(10) unsigned NOT NULL DEFAULT '0',
`attrib_type_id` smallint(5) unsigned NOT NULL DEFAULT '0',
`value` text NOT NULL,
UNIQUE KEY `misc_attribx` (`misc_feature_id`,`attrib_type_id`,`value`(500)),
KEY `type_val_idx` (`attrib_type_id`,`value`(40)),
KEY `val_only_idx` (`value`(40)),
KEY `misc_feature_idx` (`misc_feature_id`)
......@@ -703,6 +705,7 @@ CREATE TABLE `seq_region_attrib` (
`seq_region_id` int(10) unsigned NOT NULL DEFAULT '0',
`attrib_type_id` smallint(5) unsigned NOT NULL DEFAULT '0',
`value` text NOT NULL,
UNIQUE KEY `region_attribx` (`seq_region_id`,`attrib_type_id`,`value`(500)),
KEY `type_val_idx` (`attrib_type_id`,`value`(40)),
KEY `val_only_idx` (`value`(40)),
KEY `seq_region_idx` (`seq_region_id`)
......@@ -831,6 +834,7 @@ CREATE TABLE `transcript_attrib` (
`transcript_id` int(10) unsigned NOT NULL DEFAULT '0',
`attrib_type_id` smallint(5) unsigned NOT NULL DEFAULT '0',
`value` text NOT NULL,
UNIQUE KEY `transcript_attribx` (`transcript_id`,`attrib_type_id`,`value`(500)),
KEY `type_val_idx` (`attrib_type_id`,`value`(40)),
KEY `val_only_idx` (`value`(40)),
KEY `transcript_idx` (`transcript_id`)
......@@ -873,6 +877,7 @@ CREATE TABLE `translation_attrib` (
`translation_id` int(10) unsigned NOT NULL DEFAULT '0',
`attrib_type_id` smallint(5) unsigned NOT NULL DEFAULT '0',
`value` text NOT NULL,
UNIQUE KEY `translation_attribx` (`translation_id`,`attrib_type_id`,`value`(500)),
KEY `type_val_idx` (`attrib_type_id`,`value`(40)),
KEY `val_only_idx` (`value`(40)),
KEY `translation_idx` (`translation_id`)
......
......@@ -49,3 +49,5 @@
102 \N patch patch_74_75_b.sql|transcript_source
103 \N patch patch_74_75_c.sql|add_genome_statistics
104 \N patch patch_74_75_d.sql|default_transcript_source
105 \N patch patch_74_75_e.sql|unique_attrib_key
106 \N patch patch_74_75_f.sql|longer_code
......@@ -98,7 +98,7 @@ CREATE TABLE `associated_xref` (
CREATE TABLE `attrib_type` (
`attrib_type_id` smallint(5) unsigned NOT NULL AUTO_INCREMENT,
`code` varchar(15) NOT NULL DEFAULT '',
`code` varchar(20) NOT NULL DEFAULT '',
`name` varchar(255) NOT NULL DEFAULT '',
`description` text,
PRIMARY KEY (`attrib_type_id`),
......@@ -320,6 +320,7 @@ CREATE TABLE `gene_attrib` (
`gene_id` int(10) unsigned NOT NULL DEFAULT '0',
`attrib_type_id` smallint(5) unsigned NOT NULL DEFAULT '0',
`value` text NOT NULL,
UNIQUE KEY `gene_attribx` (`gene_id`,`attrib_type_id`,`value`(500)),
KEY `gene_idx` (`gene_id`),
KEY `type_val_idx` (`attrib_type_id`,`value`(40)),
KEY `val_only_idx` (`value`(40))
......@@ -467,7 +468,7 @@ CREATE TABLE `meta` (
PRIMARY KEY (`meta_id`),
UNIQUE KEY `species_key_value_idx` (`species_id`,`meta_key`,`meta_value`),
KEY `species_value_idx` (`species_id`,`meta_value`)
) ENGINE=MyISAM AUTO_INCREMENT=105 DEFAULT CHARSET=latin1;
) ENGINE=MyISAM AUTO_INCREMENT=107 DEFAULT CHARSET=latin1;
CREATE TABLE `meta_coord` (
`table_name` varchar(40) NOT NULL,
......@@ -480,6 +481,7 @@ CREATE TABLE `misc_attrib` (
`misc_feature_id` int(10) unsigned NOT NULL DEFAULT '0',
`attrib_type_id` smallint(5) unsigned NOT NULL DEFAULT '0',
`value` text NOT NULL,
UNIQUE KEY `misc_attribx` (`misc_feature_id`,`attrib_type_id`,`value`(500)),
KEY `misc_feature_idx` (`misc_feature_id`),
KEY `type_val_idx` (`attrib_type_id`,`value`(40)),
KEY `val_only_idx` (`value`(40))
......@@ -702,6 +704,7 @@ CREATE TABLE `seq_region_attrib` (
`seq_region_id` int(10) unsigned NOT NULL DEFAULT '0',
`attrib_type_id` smallint(5) unsigned NOT NULL DEFAULT '0',
`value` text NOT NULL,
UNIQUE KEY `region_attribx` (`seq_region_id`,`attrib_type_id`,`value`(500)),
KEY `seq_region_idx` (`seq_region_id`),
KEY `type_val_idx` (`attrib_type_id`,`value`(40)),
KEY `val_only_idx` (`value`(40))
......@@ -830,6 +833,7 @@ CREATE TABLE `transcript_attrib` (
`transcript_id` int(10) unsigned NOT NULL DEFAULT '0',
`attrib_type_id` smallint(5) unsigned NOT NULL DEFAULT '0',
`value` text NOT NULL,
UNIQUE KEY `transcript_attribx` (`transcript_id`,`attrib_type_id`,`value`(500)),
KEY `transcript_idx` (`transcript_id`),
KEY `type_val_idx` (`attrib_type_id`,`value`(40)),
KEY `val_only_idx` (`value`(40))
......@@ -872,6 +876,7 @@ CREATE TABLE `translation_attrib` (
`translation_id` int(10) unsigned NOT NULL DEFAULT '0',
`attrib_type_id` smallint(5) unsigned NOT NULL DEFAULT '0',
`value` text NOT NULL,
UNIQUE KEY `translation_attribx` (`translation_id`,`attrib_type_id`,`value`(500)),
KEY `translation_idx` (`translation_id`),
KEY `type_val_idx` (`attrib_type_id`,`value`(40)),
KEY `val_only_idx` (`value`(40))
......
......@@ -49,3 +49,5 @@
98 \N patch patch_74_75_b.sql|transcript_source
99 \N patch patch_74_75_c.sql|add_genome_statistics
100 \N patch patch_74_75_d.sql|default_transcript_source
101 \N patch patch_74_75_e.sql|unique_attrib_key
102 \N patch patch_74_75_f.sql|longer_code
......@@ -99,7 +99,7 @@ CREATE TABLE `associated_xref` (
CREATE TABLE `attrib_type` (
`attrib_type_id` smallint(5) unsigned NOT NULL AUTO_INCREMENT,
`code` varchar(15) NOT NULL DEFAULT '',
`code` varchar(20) NOT NULL DEFAULT '',
`name` varchar(255) NOT NULL DEFAULT '',
`description` text,
PRIMARY KEY (`attrib_type_id`),
......@@ -316,8 +316,10 @@ CREATE TABLE `gene_archive` (
CREATE TABLE `gene_attrib` (
`gene_id` int(10) unsigned NOT NULL DEFAULT '0',
`attrib_type_id` smallint(5) unsigned NOT NULL DEFAULT '0',
`value` varchar(255) NOT NULL DEFAULT '',
KEY `type_val_idx` (`attrib_type_id`,`value`),
`value` text NOT NULL,
UNIQUE KEY `gene_attribx` (`gene_id`,`attrib_type_id`,`value`(500)),
KEY `type_val_idx` (`attrib_type_id`,`value`(40)),
KEY `val_only_idx` (`value`(40)),
KEY `gene_idx` (`gene_id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
......@@ -461,7 +463,7 @@ CREATE TABLE `meta` (
PRIMARY KEY (`meta_id`),
UNIQUE KEY `species_key_value_idx` (`species_id`,`meta_key`,`meta_value`),
KEY `species_value_idx` (`species_id`,`meta_value`)
) ENGINE=MyISAM AUTO_INCREMENT=101 DEFAULT CHARSET=latin1;
) ENGINE=MyISAM AUTO_INCREMENT=103 DEFAULT CHARSET=latin1;
CREATE TABLE `meta_coord` (
`table_name` varchar(40) NOT NULL DEFAULT '',
......@@ -473,8 +475,10 @@ CREATE TABLE `meta_coord` (
CREATE TABLE `misc_attrib` (
`misc_feature_id` int(10) unsigned NOT NULL DEFAULT '0',
`attrib_type_id` smallint(5) unsigned NOT NULL DEFAULT '0',
`value` varchar(255) NOT NULL DEFAULT '',
KEY `type_val_idx` (`attrib_type_id`,`value`),
`value` text NOT NULL,
UNIQUE KEY `misc_attribx` (`misc_feature_id`,`attrib_type_id`,`value`(500)),
KEY `type_val_idx` (`attrib_type_id`,`value`(40)),
KEY `val_only_idx` (`value`(40)),
KEY `misc_feature_idx` (`misc_feature_id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
......@@ -693,8 +697,10 @@ CREATE TABLE `seq_region` (
CREATE TABLE `seq_region_attrib` (
`seq_region_id` int(10) unsigned NOT NULL DEFAULT '0',
`attrib_type_id` smallint(5) unsigned NOT NULL DEFAULT '0',
`value` varchar(255) NOT NULL DEFAULT '',
KEY `type_val_idx` (`attrib_type_id`,`value`),
`value` text NOT NULL,
UNIQUE KEY `region_attribx` (`seq_region_id`,`attrib_type_id`,`value`(500)),
KEY `type_val_idx` (`attrib_type_id`,`value`(40)),
KEY `val_only_idx` (`value`(40)),
KEY `seq_region_idx` (`seq_region_id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
......@@ -781,8 +787,10 @@ CREATE TABLE `transcript` (
CREATE TABLE `transcript_attrib` (
`transcript_id` int(10) unsigned NOT NULL DEFAULT '0',
`attrib_type_id` smallint(5) unsigned NOT NULL DEFAULT '0',
`value` varchar(255) NOT NULL DEFAULT '',
KEY `type_val_idx` (`attrib_type_id`,`value`),
`value` text NOT NULL,
UNIQUE KEY `transcript_attribx` (`transcript_id`,`attrib_type_id`,`value`(500)),
KEY `type_val_idx` (`attrib_type_id`,`value`(40)),
KEY `val_only_idx` (`value`(40)),
KEY `transcript_idx` (`transcript_id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
......@@ -822,8 +830,10 @@ CREATE TABLE `translation` (
CREATE TABLE `translation_attrib` (
`translation_id` int(10) unsigned NOT NULL DEFAULT '0',
`attrib_type_id` smallint(5) unsigned NOT NULL DEFAULT '0',
`value` varchar(255) NOT NULL DEFAULT '',
KEY `type_val_idx` (`attrib_type_id`,`value`),
`value` text NOT NULL,
UNIQUE KEY `translation_attribx` (`translation_id`,`attrib_type_id`,`value`(500)),
KEY `type_val_idx` (`attrib_type_id`,`value`(40)),
KEY `val_only_idx` (`value`(40)),
KEY `translation_idx` (`translation_id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
......
......@@ -53,3 +53,5 @@
2060 \N patch patch_74_75_b.sql|transcript_source
2061 \N patch patch_74_75_c.sql|add_genome_statistics
2062 \N patch patch_74_75_d.sql|default_transcript_source
2063 \N patch patch_74_75_e.sql|unique_attrib_key
2064 \N patch patch_74_75_f.sql|longer_code
......@@ -98,7 +98,7 @@ CREATE TABLE `associated_xref` (
CREATE TABLE `attrib_type` (
`attrib_type_id` smallint(5) unsigned NOT NULL AUTO_INCREMENT,
`code` varchar(15) COLLATE latin1_bin NOT NULL DEFAULT '',
`code` varchar(20) COLLATE latin1_bin NOT NULL DEFAULT '',
`name` varchar(255) COLLATE latin1_bin NOT NULL DEFAULT '',
`description` text COLLATE latin1_bin,
PRIMARY KEY (`attrib_type_id`),
......@@ -315,8 +315,9 @@ CREATE TABLE `gene_archive` (
CREATE TABLE `gene_attrib` (
`gene_id` int(10) unsigned NOT NULL DEFAULT '0',
`attrib_type_id` smallint(5) unsigned NOT NULL DEFAULT '0',
`value` varchar(255) COLLATE latin1_bin NOT NULL DEFAULT '',
KEY `type_val_idx` (`attrib_type_id`,`value`),
`value` text COLLATE latin1_bin NOT NULL,
UNIQUE KEY `gene_attribx` (`gene_id`,`attrib_type_id`,`value`(500)),
KEY `type_val_idx` (`attrib_type_id`,`value`(40)),
KEY `gene_idx` (`gene_id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_bin;
......@@ -330,7 +331,7 @@ CREATE TABLE `genome_statistics` (
PRIMARY KEY (`genome_statistics_id`),
UNIQUE KEY `stats_uniq` (`statistic`,`attrib_type_id`,`species_id`),
KEY `stats_idx` (`statistic`,`attrib_type_id`,`species_id`)
) ENGINE=MyISAM AUTO_INCREMENT=37 DEFAULT CHARSET=latin1;
) ENGINE=MyISAM AUTO_INCREMENT=39 DEFAULT CHARSET=latin1;
CREATE TABLE `identity_xref` (
`object_xref_id` int(10) unsigned NOT NULL DEFAULT '0',
......@@ -461,7 +462,7 @@ CREATE TABLE `meta` (
PRIMARY KEY (`meta_id`),
UNIQUE KEY `species_key_value_idx` (`species_id`,`meta_key`,`meta_value`),
KEY `species_value_idx` (`species_id`,`meta_value`)
) ENGINE=MyISAM AUTO_INCREMENT=2063 DEFAULT CHARSET=latin1;
) ENGINE=MyISAM AUTO_INCREMENT=2065 DEFAULT CHARSET=latin1;
CREATE TABLE `meta_coord` (
`table_name` varchar(40) COLLATE latin1_bin NOT NULL DEFAULT '',
......@@ -473,8 +474,9 @@ CREATE TABLE `meta_coord` (
CREATE TABLE `misc_attrib` (
`misc_feature_id` int(10) unsigned NOT NULL DEFAULT '0',
`attrib_type_id` smallint(5) unsigned NOT NULL DEFAULT '0',
`value` varchar(255) COLLATE latin1_bin NOT NULL DEFAULT '',
KEY `type_val_idx` (`attrib_type_id`,`value`),
`value` text COLLATE latin1_bin NOT NULL,
UNIQUE KEY `misc_attribx` (`misc_feature_id`,`attrib_type_id`,`value`(500)),
KEY `type_val_idx` (`attrib_type_id`,`value`(40)),
KEY `misc_feature_idx` (`misc_feature_id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_bin;
......@@ -693,8 +695,9 @@ CREATE TABLE `seq_region` (
CREATE TABLE `seq_region_attrib` (
`seq_region_id` int(10) unsigned NOT NULL DEFAULT '0',
`attrib_type_id` smallint(5) unsigned NOT NULL DEFAULT '0',
`value` varchar(255) COLLATE latin1_bin NOT NULL DEFAULT '',
KEY `type_val_idx` (`attrib_type_id`,`value`),
`value` text COLLATE latin1_bin NOT NULL,
UNIQUE KEY `region_attribx` (`seq_region_id`,`attrib_type_id`,`value`(500)),
KEY `type_val_idx` (`attrib_type_id`,`value`(40)),
KEY `seq_region_idx` (`seq_region_id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_bin;
......@@ -781,8 +784,9 @@ CREATE TABLE `transcript` (
CREATE TABLE `transcript_attrib` (
`transcript_id` int(10) unsigned NOT NULL DEFAULT '0',
`attrib_type_id` smallint(5) unsigned NOT NULL DEFAULT '0',
`value` varchar(255) COLLATE latin1_bin NOT NULL DEFAULT '',
KEY `type_val_idx` (`attrib_type_id`,`value`),
`value` text COLLATE latin1_bin NOT NULL,
UNIQUE KEY `transcript_attribx` (`transcript_id`,`attrib_type_id`,`value`(500)),
KEY `type_val_idx` (`attrib_type_id`,`value`(40)),
KEY `transcript_idx` (`transcript_id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_bin;
......@@ -822,8 +826,9 @@ CREATE TABLE `translation` (
CREATE TABLE `translation_attrib` (
`translation_id` int(10) unsigned NOT NULL DEFAULT '0',
`attrib_type_id` smallint(5) unsigned NOT NULL DEFAULT '0',
`value` varchar(255) COLLATE latin1_bin NOT NULL DEFAULT '',
KEY `type_val_idx` (`attrib_type_id`,`value`),
`value` text COLLATE latin1_bin NOT NULL,
UNIQUE KEY `translation_attribx` (`translation_id`,`attrib_type_id`,`value`(500)),
KEY `type_val_idx` (`attrib_type_id`,`value`(40)),
KEY `translation_idx` (`translation_id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_bin;
......
1 \N schema_version 74
1 \N schema_version 75
2 1 assembly.default NCBI34
3 1 species.taxonomy_id 9606
26 1 species.classification Homo sapiens
......@@ -42,3 +42,11 @@
90 \N patch patch_73_74_d.sql|remove_qtl
97 \N patch patch_73_74_e.sql|remove_canonical_annotation
98 \N patch patch_73_74_f.sql|remove_pair_dna_align
99 \N patch patch_73_74_g.sql|add_transcript_idx_tise
100 \N patch patch_73_74_h.sql|alt_allele_unique_gene_idx
101 \N patch patch_74_75_a.sql|schema_version
102 \N patch patch_74_75_b.sql|transcript_source
103 \N patch patch_74_75_c.sql|add_genome_statistics
104 \N patch patch_74_75_d.sql|default_transcript_source
105 \N patch patch_74_75_e.sql|unique_attrib_key
106 \N patch patch_74_75_f.sql|longer_code
......@@ -3,6 +3,7 @@ CREATE TABLE `alt_allele` (
`alt_allele_group_id` int(10) unsigned NOT NULL,
`gene_id` int(10) unsigned NOT NULL,
PRIMARY KEY (`alt_allele_id`),
UNIQUE KEY `gene_idx` (`gene_id`),
KEY `gene_id` (`gene_id`,`alt_allele_group_id`)
) ENGINE=MyISAM AUTO_INCREMENT=11 DEFAULT CHARSET=latin1;
......@@ -97,7 +98,7 @@ CREATE TABLE `associated_xref` (
CREATE TABLE `attrib_type` (
`attrib_type_id` smallint(5) unsigned NOT NULL AUTO_INCREMENT,
`code` varchar(15) NOT NULL DEFAULT '',
`code` varchar(20) NOT NULL DEFAULT '',
`name` varchar(255) NOT NULL DEFAULT '',
`description` text,
PRIMARY KEY (`attrib_type_id`),
......@@ -319,11 +320,24 @@ CREATE TABLE `gene_attrib` (
`gene_id` int(10) unsigned NOT NULL DEFAULT '0',
`attrib_type_id` smallint(5) unsigned NOT NULL DEFAULT '0',
`value` text NOT NULL,
UNIQUE KEY `gene_attribx` (`gene_id`,`attrib_type_id`,`value`(500)),
KEY `gene_idx` (`gene_id`),
KEY `type_val_idx` (`attrib_type_id`,`value`(40)),
KEY `val_only_idx` (`value`(40))
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
CREATE TABLE `genome_statistics` (
`genome_statistics_id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`statistic` varchar(128) NOT NULL,
`value` int(10) unsigned NOT NULL DEFAULT '0',
`species_id` int(10) unsigned DEFAULT '1',
`attrib_type_id` int(10) unsigned DEFAULT NULL,
`timestamp` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
PRIMARY KEY (`genome_statistics_id`),
UNIQUE KEY `stats_uniq` (`statistic`,`attrib_type_id`,`species_id`),
KEY `stats_idx` (`statistic`,`attrib_type_id`,`species_id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
CREATE TABLE `identity_xref` (
`object_xref_id` int(10) unsigned NOT NULL,
`xref_identity` int(5) DEFAULT NULL,
......@@ -454,7 +468,7 @@ CREATE TABLE `meta` (
PRIMARY KEY (`meta_id`),
UNIQUE KEY `species_key_value_idx` (`species_id`,`meta_key`,`meta_value`),
KEY `species_value_idx` (`species_id`,`meta_value`)
) ENGINE=MyISAM AUTO_INCREMENT=99 DEFAULT CHARSET=latin1;
) ENGINE=MyISAM AUTO_INCREMENT=107 DEFAULT CHARSET=latin1;
CREATE TABLE `meta_coord` (
`table_name` varchar(40) NOT NULL,
......@@ -467,6 +481,7 @@ CREATE TABLE `misc_attrib` (
`misc_feature_id` int(10) unsigned NOT NULL DEFAULT '0',
`attrib_type_id` smallint(5) unsigned NOT NULL DEFAULT '0',
`value` text NOT NULL,
UNIQUE KEY `misc_attribx` (`misc_feature_id`,`attrib_type_id`,`value`(500)),
KEY `misc_feature_idx` (`misc_feature_id`),
KEY `type_val_idx` (`attrib_type_id`,`value`(40)),
KEY `val_only_idx` (`value`(40))
......@@ -689,6 +704,7 @@ CREATE TABLE `seq_region_attrib` (
`seq_region_id` int(10) unsigned NOT NULL DEFAULT '0',
`attrib_type_id` smallint(5) unsigned NOT NULL DEFAULT '0',
`value` text NOT NULL,
UNIQUE KEY `region_attribx` (`seq_region_id`,`attrib_type_id`,`value`(500)),
KEY `seq_region_idx` (`seq_region_id`),
KEY `type_val_idx` (`attrib_type_id`,`value`(40)),
KEY `val_only_idx` (`value`(40))
......@@ -794,6 +810,7 @@ CREATE TABLE `transcript` (
`seq_region_end` int(10) unsigned NOT NULL,
`seq_region_strand` tinyint(2) NOT NULL,
`display_xref_id` int(10) unsigned DEFAULT NULL,
`source` varchar(20) NOT NULL DEFAULT 'ensembl',
`biotype` varchar(40) NOT NULL,
`status` enum('KNOWN','NOVEL','PUTATIVE','PREDICTED','KNOWN_BY_PROJECTION','UNKNOWN','ANNOTATED') DEFAULT NULL,
`description` text,
......@@ -816,6 +833,7 @@ CREATE TABLE `transcript_attrib` (
`transcript_id` int(10) unsigned NOT NULL DEFAULT '0',
`attrib_type_id` smallint(5) unsigned NOT NULL DEFAULT '0',
`value` text NOT NULL,
UNIQUE KEY `transcript_attribx` (`transcript_id`,`attrib_type_id`,`value`(500)),
KEY `transcript_idx` (`transcript_id`),
KEY `type_val_idx` (`attrib_type_id`,`value`(40)),
KEY `val_only_idx` (`value`(40))
......@@ -826,7 +844,8 @@ CREATE TABLE `transcript_intron_supporting_evidence` (
`intron_supporting_evidence_id` int(10) unsigned NOT NULL,
`previous_exon_id` int(10) unsigned NOT NULL,
`next_exon_id` int(10) unsigned NOT NULL,
PRIMARY KEY (`intron_supporting_evidence_id`,`transcript_id`)
PRIMARY KEY (`intron_supporting_evidence_id`,`transcript_id`),
KEY `transcript_idx` (`transcript_id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
CREATE TABLE `transcript_supporting_feature` (
......@@ -857,6 +876,7 @@ CREATE TABLE `translation_attrib` (
`translation_id` int(10) unsigned NOT NULL DEFAULT '0',
`attrib_type_id` smallint(5) unsigned NOT NULL DEFAULT '0',
`value` text NOT NULL,
UNIQUE KEY `translation_attribx` (`translation_id`,`attrib_type_id`,`value`(500)),
KEY `translation_idx` (`translation_id`),
KEY `type_val_idx` (`attrib_type_id`,`value`(40)),
KEY `val_only_idx` (`value`(40))
......
......@@ -8,8 +8,16 @@
64 \N patch patch_73_74_d.sql|remove_qtl
65 \N patch patch_73_74_e.sql|remove_canonical_annotation
66 \N patch patch_73_74_f.sql|remove_pair_dna_align
162 \N patch patch_73_74_g.sql|add_transcript_idx_tise
163 \N patch patch_73_74_h.sql|alt_allele_unique_gene_idx
164 \N patch patch_74_75_a.sql|schema_version
165 \N patch patch_74_75_b.sql|transcript_source
166 \N patch patch_74_75_c.sql|add_genome_statistics
167 \N patch patch_74_75_d.sql|default_transcript_source
168 \N patch patch_74_75_e.sql|unique_attrib_key
169 \N patch patch_74_75_f.sql|longer_code
1 \N schema_type core
2 \N schema_version 74
2 \N schema_version 75
8 1 assembly.accession GCA_000292705.1
10 1 assembly.date 2012-08
7 1 assembly.default GCA_000292705.1
......@@ -83,7 +91,6 @@
161 2 patch patch_73_74_b.sql|remove_dnac
142 2 provider.name European Nucleotide Archive
143 2 provider.url http://www.ebi.ac.uk/ena/data/view/GCA_000292706
118 2 repeat.analysis Dust
119 2 repeat.analysis TRF
148 2 sample.gene_param BTF1_30792
149 2 sample.gene_text BTF1_30792
......
......@@ -3,6 +3,7 @@ CREATE TABLE `alt_allele` (
`alt_allele_group_id` int(10) unsigned NOT NULL,
`gene_id` int(10) unsigned NOT NULL,
PRIMARY KEY (`alt_allele_id`),
UNIQUE KEY `gene_idx` (`gene_id`),
KEY `gene_id` (`gene_id`,`alt_allele_group_id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
......@@ -97,7 +98,7 @@ CREATE TABLE `associated_xref` (
CREATE TABLE `attrib_type` (
`attrib_type_id` smallint(5) unsigned NOT NULL AUTO_INCREMENT,
`code` varchar(50) DEFAULT NULL,
`code` varchar(20) NOT NULL DEFAULT '',
`name` varchar(255) NOT NULL DEFAULT '',
`description` text,
PRIMARY KEY (`attrib_type_id`),
......@@ -319,11 +320,24 @@ CREATE TABLE `gene_attrib` (
`gene_id` int(10) unsigned NOT NULL DEFAULT '0',
`attrib_type_id` smallint(5) unsigned NOT NULL DEFAULT '0',
`value` text NOT NULL,
UNIQUE KEY `gene_attribx` (`gene_id`,`attrib_type_id`,`value`(500)),
KEY `type_val_idx` (`attrib_type_id`,`value`(40)),
KEY `val_only_idx` (`value`(40)),
KEY `gene_idx` (`gene_id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
CREATE TABLE `genome_statistics` (
`genome_statistics_id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`statistic` varchar(128) NOT NULL,
`value` int(10) unsigned NOT NULL DEFAULT '0',
`species_id` int(10) unsigned DEFAULT '1',
`attrib_type_id` int(10) unsigned DEFAULT NULL,
`timestamp` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
PRIMARY KEY (`genome_statistics_id`),
UNIQUE KEY `stats_uniq` (`statistic`,`attrib_type_id`,`species_id`),
KEY `stats_idx` (`statistic`,`attrib_type_id`,`species_id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
CREATE TABLE `identity_xref` (
`object_xref_id` int(10) unsigned NOT NULL,
`xref_identity` int(5) DEFAULT NULL,
......@@ -455,7 +469,7 @@ CREATE TABLE `meta` (
PRIMARY KEY (`meta_id`),
UNIQUE KEY `species_key_value_idx` (`species_id`,`meta_key`,`meta_value`),
KEY `species_value_idx` (`species_id`,`meta_value`)
) ENGINE=InnoDB AUTO_INCREMENT=67 DEFAULT CHARSET=latin1;
) ENGINE=InnoDB AUTO_INCREMENT=170 DEFAULT CHARSET=latin1;
CREATE TABLE `meta_coord` (
`table_name` varchar(40) NOT NULL,
......@@ -468,6 +482,7 @@ CREATE TABLE `misc_attrib` (
`misc_feature_id` int(10) unsigned NOT NULL DEFAULT '0',
`attrib_type_id` smallint(5) unsigned NOT NULL DEFAULT '0',
`value` text NOT NULL,
UNIQUE KEY `misc_attribx` (`misc_feature_id`,`attrib_type_id`,`value`(500)),
KEY `type_val_idx` (`attrib_type_id`,`value`(40)),
KEY `val_only_idx` (`value`(40)),
KEY `misc_feature_idx` (`misc_feature_id`)
......@@ -690,6 +705,7 @@ CREATE TABLE `seq_region_attrib` (
`seq_region_id` int(10) unsigned NOT NULL DEFAULT '0',
`attrib_type_id` smallint(5) unsigned NOT NULL DEFAULT '0',
`value` text NOT NULL,
UNIQUE KEY `region_attribx` (`seq_region_id`,`attrib_type_id`,`value`(500)),
KEY `type_val_idx` (`attrib_type_id`,`value`(40)),
KEY `val_only_idx` (`value`(40)),
KEY `seq_region_idx` (`seq_region_id`)
......@@ -795,6 +811,7 @@ CREATE TABLE `transcript` (
`seq_region_end` int(10) unsigned NOT NULL,
`seq_region_strand` tinyint(2) NOT NULL,
`display_xref_id` int(10) unsigned DEFAULT NULL,
`source` varchar(20) NOT NULL DEFAULT 'ensembl',
`biotype` varchar(40) NOT NULL,
`status` enum('KNOWN','NOVEL','PUTATIVE','PREDICTED','KNOWN_BY_PROJECTION','UNKNOWN','ANNOTATED') DEFAULT NULL,
`description` text,
......@@ -817,6 +834,7 @@ CREATE TABLE `transcript_attrib` (
`transcript_id` int(10) unsigned NOT NULL DEFAULT '0',
`attrib_type_id` smallint(5) unsigned NOT NULL DEFAULT '0',
`value` text NOT NULL,
UNIQUE KEY `transcript_attribx` (`transcript_id`,`attrib_type_id`,`value`(500)),
KEY `type_val_idx` (`attrib_type_id`,`value`(40)),
KEY `val_only_idx` (`value`(40)),
KEY `transcript_idx` (`transcript_id`)
......@@ -827,7 +845,8 @@ CREATE TABLE `transcript_intron_supporting_evidence` (
`intron_supporting_evidence_id` int(10) unsigned NOT NULL,
`previous_exon_id` int(10) unsigned NOT NULL,
`next_exon_id` int(10) unsigned NOT NULL,
PRIMARY KEY (`intron_supporting_evidence_id`,`transcript_id`)
PRIMARY KEY (`intron_supporting_evidence_id`,`transcript_id`),
KEY `transcript_idx` (`transcript_id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
CREATE TABLE `transcript_supporting_feature` (
......@@ -858,6 +877,7 @@ CREATE TABLE `translation_attrib` (
`translation_id` int(10) unsigned NOT NULL DEFAULT '0',
`attrib_type_id` smallint(5) unsigned NOT NULL DEFAULT '0',
`value` text NOT NULL,
UNIQUE KEY `translation_attribx` (`translation_id`,`attrib_type_id`,`value`(500)),
KEY `type_val_idx` (`attrib_type_id`,`value`(40)),
KEY `val_only_idx` (`value`(40)),
KEY `translation_idx` (`translation_id`)
......
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