Skip to content

Commit

Permalink
Update wiki-assets according to the latest db structure
Browse files Browse the repository at this point in the history
  • Loading branch information
pradumangoyal committed Sep 3, 2019
1 parent 02abe2e commit b787d46
Show file tree
Hide file tree
Showing 4 changed files with 49 additions and 71 deletions.
Binary file modified wiki-assets/database-schema.mwb
Binary file not shown.
Binary file added wiki-assets/database-schema.mwb.bak
Binary file not shown.
Binary file modified wiki-assets/database-schema.pdf
Binary file not shown.
120 changes: 49 additions & 71 deletions wiki-assets/database-schema.sql
@@ -1,5 +1,5 @@
-- MySQL Script generated by MySQL Workbench
-- Friday 16 August 2019 09:53:13 PM IST
-- Tuesday 03 September 2019 02:24:28 PM IST
-- Model: New Model Version: 1.0
-- MySQL Workbench Forward Engineering

Expand All @@ -13,20 +13,20 @@ SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='TRADITIONAL,ALLOW_INVALID_DATES';
-- -----------------------------------------------------
-- Schema ecircdb
-- -----------------------------------------------------
DROP SCHEMA IF EXISTS `ecircdb` ;

-- -----------------------------------------------------
-- Schema ecircdb
-- Schema ecircdb_updated
-- -----------------------------------------------------
CREATE SCHEMA IF NOT EXISTS `ecircdb` DEFAULT CHARACTER SET latin1 ;
USE `ecircdb` ;

-- -----------------------------------------------------
-- Table `ecircdb`.`core_species`
-- Schema ecircdb_updated
-- -----------------------------------------------------
DROP TABLE IF EXISTS `ecircdb`.`core_species` ;
CREATE SCHEMA IF NOT EXISTS `ecircdb_updated` DEFAULT CHARACTER SET latin1 ;
USE `ecircdb_updated` ;

CREATE TABLE IF NOT EXISTS `ecircdb`.`core_species` (
-- -----------------------------------------------------
-- Table `ecircdb_updated`.`core_species`
-- -----------------------------------------------------
CREATE TABLE IF NOT EXISTS `ecircdb_updated`.`core_species` (
`taxon_id` INT(11) NOT NULL AUTO_INCREMENT,
`scientific_name` VARCHAR(127) NOT NULL,
`common_name` VARCHAR(127) NULL DEFAULT NULL,
Expand All @@ -39,11 +39,9 @@ DEFAULT CHARACTER SET = latin1;


-- -----------------------------------------------------
-- Table `ecircdb`.`core_assembly`
-- Table `ecircdb_updated`.`core_assembly`
-- -----------------------------------------------------
DROP TABLE IF EXISTS `ecircdb`.`core_assembly` ;

CREATE TABLE IF NOT EXISTS `ecircdb`.`core_assembly` (
CREATE TABLE IF NOT EXISTS `ecircdb_updated`.`core_assembly` (
`assembly_id` INT(11) NOT NULL AUTO_INCREMENT,
`assembly_accession` VARCHAR(255) NOT NULL,
`assembly_name` VARCHAR(255) NOT NULL,
Expand All @@ -53,25 +51,22 @@ CREATE TABLE IF NOT EXISTS `ecircdb`.`core_assembly` (
INDEX `core_assembly_species_id_id_7b5c3c16_fk_core_species_taxon_id` (`species_id_id` ASC),
CONSTRAINT `core_assembly_species_id_id_7b5c3c16_fk_core_species_taxon_id`
FOREIGN KEY (`species_id_id`)
REFERENCES `ecircdb`.`core_species` (`taxon_id`))
REFERENCES `ecircdb_updated`.`core_species` (`taxon_id`))
ENGINE = InnoDB
AUTO_INCREMENT = 45
AUTO_INCREMENT = 14
DEFAULT CHARACTER SET = latin1;


-- -----------------------------------------------------
-- Table `ecircdb`.`core_sample`
-- Table `ecircdb_updated`.`core_sample`
-- -----------------------------------------------------
DROP TABLE IF EXISTS `ecircdb`.`core_sample` ;

CREATE TABLE IF NOT EXISTS `ecircdb`.`core_sample` (
CREATE TABLE IF NOT EXISTS `ecircdb_updated`.`core_sample` (
`sample_id` INT(11) NOT NULL AUTO_INCREMENT,
`accession` VARCHAR(55) NOT NULL,
`backspliced_reads` INT(11) NULL DEFAULT NULL,
`chimeric_reads` INT(11) NULL DEFAULT NULL,
`circrna_count` INT(11) NULL DEFAULT NULL,
`description` LONGTEXT NULL DEFAULT NULL,
`fastqc_path` VARCHAR(255) NULL DEFAULT NULL,
`bigwig_path` VARCHAR(255) NULL DEFAULT NULL,
`ftp_path` VARCHAR(255) NULL DEFAULT NULL,
`instrument` VARCHAR(103) NULL DEFAULT NULL,
Expand All @@ -87,24 +82,21 @@ CREATE TABLE IF NOT EXISTS `ecircdb`.`core_sample` (
`total_spliced_reads` INT(11) NULL DEFAULT NULL,
`TIN` INT(11) NULL DEFAULT NULL,
`species_id_id` INT(11) NULL DEFAULT NULL,
`fastq_path` VARCHAR(255) NULL DEFAULT NULL,
`source_id` INT(11) NULL DEFAULT NULL,
`fastqc_path` VARCHAR(255) NULL DEFAULT NULL,
PRIMARY KEY (`sample_id`),
INDEX `core_sample_species_id_id_c6f049f6_fk_core_species_taxon_id` (`species_id_id` ASC),
CONSTRAINT `core_sample_species_id_id_c6f049f6_fk_core_species_taxon_id`
FOREIGN KEY (`species_id_id`)
REFERENCES `ecircdb`.`core_species` (`taxon_id`))
REFERENCES `ecircdb_updated`.`core_species` (`taxon_id`))
ENGINE = InnoDB
AUTO_INCREMENT = 923
AUTO_INCREMENT = 109
DEFAULT CHARACTER SET = latin1;


-- -----------------------------------------------------
-- Table `ecircdb`.`core_analysis`
-- Table `ecircdb_updated`.`core_analysis`
-- -----------------------------------------------------
DROP TABLE IF EXISTS `ecircdb`.`core_analysis` ;

CREATE TABLE IF NOT EXISTS `ecircdb`.`core_analysis` (
CREATE TABLE IF NOT EXISTS `ecircdb_updated`.`core_analysis` (
`analysis_id` INT(11) NOT NULL AUTO_INCREMENT,
`run_date` VARCHAR(255) NOT NULL,
`logic_name` VARCHAR(255) NOT NULL,
Expand All @@ -116,24 +108,21 @@ CREATE TABLE IF NOT EXISTS `ecircdb`.`core_analysis` (
INDEX `core_analysis_sample_id_id_975f722e_fk_core_sample_sample_id` (`sample_id_id` ASC),
CONSTRAINT `core_analysis_assembly_id_id_e390aed0_fk_core_asse`
FOREIGN KEY (`assembly_id_id`)
REFERENCES `ecircdb`.`core_assembly` (`assembly_id`),
REFERENCES `ecircdb_updated`.`core_assembly` (`assembly_id`),
CONSTRAINT `core_analysis_sample_id_id_975f722e_fk_core_sample_sample_id`
FOREIGN KEY (`sample_id_id`)
REFERENCES `ecircdb`.`core_sample` (`sample_id`))
REFERENCES `ecircdb_updated`.`core_sample` (`sample_id`))
ENGINE = InnoDB
AUTO_INCREMENT = 1035
AUTO_INCREMENT = 100
DEFAULT CHARACTER SET = latin1;


-- -----------------------------------------------------
-- Table `ecircdb`.`core_locus`
-- Table `ecircdb_updated`.`core_locus`
-- -----------------------------------------------------
DROP TABLE IF EXISTS `ecircdb`.`core_locus` ;

CREATE TABLE IF NOT EXISTS `ecircdb`.`core_locus` (
CREATE TABLE IF NOT EXISTS `ecircdb_updated`.`core_locus` (
`locus_id` INT(11) NOT NULL AUTO_INCREMENT,
`browser_string` LONGTEXT NOT NULL,
`circrna_abundance_ratio` DECIMAL(19,6) NULL DEFAULT NULL,
`coord_id` VARCHAR(255) NULL DEFAULT NULL,
`genomic_size` INT(11) NULL DEFAULT NULL,
`seq_region_end` INT(11) NULL DEFAULT NULL,
Expand All @@ -148,24 +137,21 @@ CREATE TABLE IF NOT EXISTS `ecircdb`.`core_locus` (
`stable_id` VARCHAR(255) NULL DEFAULT NULL,
`total_backsplice_reads` INT(11) NULL DEFAULT NULL,
`total_splice_reads` INT(11) NULL DEFAULT NULL,
`biotype` VARCHAR(255) NULL DEFAULT NULL,
`assembly_id_id` INT(11) NOT NULL,
PRIMARY KEY (`locus_id`),
INDEX `core_locus_assembly_id_id_b22709ef_fk_core_assembly_assembly_id` (`assembly_id_id` ASC),
CONSTRAINT `core_locus_assembly_id_id_b22709ef_fk_core_assembly_assembly_id`
FOREIGN KEY (`assembly_id_id`)
REFERENCES `ecircdb`.`core_assembly` (`assembly_id`))
REFERENCES `ecircdb_updated`.`core_assembly` (`assembly_id`))
ENGINE = InnoDB
AUTO_INCREMENT = 1086531
AUTO_INCREMENT = 736927
DEFAULT CHARACTER SET = latin1;


-- -----------------------------------------------------
-- Table `ecircdb`.`core_backsplicejunction`
-- Table `ecircdb_updated`.`core_backsplicejunction`
-- -----------------------------------------------------
DROP TABLE IF EXISTS `ecircdb`.`core_backsplicejunction` ;

CREATE TABLE IF NOT EXISTS `ecircdb`.`core_backsplicejunction` (
CREATE TABLE IF NOT EXISTS `ecircdb_updated`.`core_backsplicejunction` (
`junction_id` INT(11) NOT NULL AUTO_INCREMENT,
`browser_string` LONGTEXT NULL DEFAULT NULL,
`coord_id` VARCHAR(255) NULL DEFAULT NULL,
Expand Down Expand Up @@ -199,21 +185,19 @@ CREATE TABLE IF NOT EXISTS `ecircdb`.`core_backsplicejunction` (
INDEX `core_backsplicejunct_locus_id_id_13fff60d_fk_core_locu` (`locus_id_id` ASC),
CONSTRAINT `core_backsplicejunct_analysis_id_id_895c5474_fk_core_anal`
FOREIGN KEY (`analysis_id_id`)
REFERENCES `ecircdb`.`core_analysis` (`analysis_id`),
REFERENCES `ecircdb_updated`.`core_analysis` (`analysis_id`),
CONSTRAINT `core_backsplicejunct_locus_id_id_13fff60d_fk_core_locu`
FOREIGN KEY (`locus_id_id`)
REFERENCES `ecircdb`.`core_locus` (`locus_id`))
REFERENCES `ecircdb_updated`.`core_locus` (`locus_id`))
ENGINE = InnoDB
AUTO_INCREMENT = 38408
AUTO_INCREMENT = 417944
DEFAULT CHARACTER SET = latin1;


-- -----------------------------------------------------
-- Table `ecircdb`.`core_canonicaljunction`
-- Table `ecircdb_updated`.`core_canonicaljunction`
-- -----------------------------------------------------
DROP TABLE IF EXISTS `ecircdb`.`core_canonicaljunction` ;

CREATE TABLE IF NOT EXISTS `ecircdb`.`core_canonicaljunction` (
CREATE TABLE IF NOT EXISTS `ecircdb_updated`.`core_canonicaljunction` (
`junction_id` INT(11) NOT NULL AUTO_INCREMENT,
`browser_string` LONGTEXT NULL DEFAULT NULL,
`coord_id` VARCHAR(255) NULL DEFAULT NULL,
Expand All @@ -234,21 +218,19 @@ CREATE TABLE IF NOT EXISTS `ecircdb`.`core_canonicaljunction` (
INDEX `core_canonicaljuncti_locus_id_id_91a79724_fk_core_locu` (`locus_id_id` ASC),
CONSTRAINT `core_canonicaljuncti_analysis_id_id_a77c1e51_fk_core_anal`
FOREIGN KEY (`analysis_id_id`)
REFERENCES `ecircdb`.`core_analysis` (`analysis_id`),
REFERENCES `ecircdb_updated`.`core_analysis` (`analysis_id`),
CONSTRAINT `core_canonicaljuncti_locus_id_id_91a79724_fk_core_locu`
FOREIGN KEY (`locus_id_id`)
REFERENCES `ecircdb`.`core_locus` (`locus_id`))
REFERENCES `ecircdb_updated`.`core_locus` (`locus_id`))
ENGINE = InnoDB
AUTO_INCREMENT = 4158084
AUTO_INCREMENT = 55214839
DEFAULT CHARACTER SET = latin1;


-- -----------------------------------------------------
-- Table `ecircdb`.`core_ensemblgene`
-- Table `ecircdb_updated`.`core_ensemblgene`
-- -----------------------------------------------------
DROP TABLE IF EXISTS `ecircdb`.`core_ensemblgene` ;

CREATE TABLE IF NOT EXISTS `ecircdb`.`core_ensemblgene` (
CREATE TABLE IF NOT EXISTS `ecircdb_updated`.`core_ensemblgene` (
`gene_id` INT(11) NOT NULL AUTO_INCREMENT,
`coord_id` VARCHAR(255) NULL DEFAULT NULL,
`seq_region_end` INT(11) NULL DEFAULT NULL,
Expand All @@ -265,18 +247,16 @@ CREATE TABLE IF NOT EXISTS `ecircdb`.`core_ensemblgene` (
INDEX `core_ensemblgene_assembly_id_id_f2ba8c34_fk_core_asse` (`assembly_id_id` ASC),
CONSTRAINT `core_ensemblgene_assembly_id_id_f2ba8c34_fk_core_asse`
FOREIGN KEY (`assembly_id_id`)
REFERENCES `ecircdb`.`core_assembly` (`assembly_id`))
REFERENCES `ecircdb_updated`.`core_assembly` (`assembly_id`))
ENGINE = InnoDB
AUTO_INCREMENT = 294048
AUTO_INCREMENT = 494008
DEFAULT CHARACTER SET = latin1;


-- -----------------------------------------------------
-- Table `ecircdb`.`core_exon`
-- Table `ecircdb_updated`.`core_exon`
-- -----------------------------------------------------
DROP TABLE IF EXISTS `ecircdb`.`core_exon` ;

CREATE TABLE IF NOT EXISTS `ecircdb`.`core_exon` (
CREATE TABLE IF NOT EXISTS `ecircdb_updated`.`core_exon` (
`id` INT(11) NOT NULL AUTO_INCREMENT,
`coord_id` VARCHAR(255) NULL DEFAULT NULL,
`genomic_size` INT(11) NULL DEFAULT NULL,
Expand All @@ -291,17 +271,15 @@ CREATE TABLE IF NOT EXISTS `ecircdb`.`core_exon` (
INDEX `core_exon_locus_id_id_c1813ee5_fk_core_locus_locus_id` (`locus_id_id` ASC),
CONSTRAINT `core_exon_locus_id_id_c1813ee5_fk_core_locus_locus_id`
FOREIGN KEY (`locus_id_id`)
REFERENCES `ecircdb`.`core_locus` (`locus_id`))
REFERENCES `ecircdb_updated`.`core_locus` (`locus_id`))
ENGINE = InnoDB
DEFAULT CHARACTER SET = latin1;


-- -----------------------------------------------------
-- Table `ecircdb`.`core_locusexpression`
-- Table `ecircdb_updated`.`core_locusexpression`
-- -----------------------------------------------------
DROP TABLE IF EXISTS `ecircdb`.`core_locusexpression` ;

CREATE TABLE IF NOT EXISTS `ecircdb`.`core_locusexpression` (
CREATE TABLE IF NOT EXISTS `ecircdb_updated`.`core_locusexpression` (
`expression_id` INT(11) NOT NULL AUTO_INCREMENT,
`rpkm` DECIMAL(19,6) NULL DEFAULT NULL,
`rpkm_external` DECIMAL(19,6) NULL DEFAULT NULL,
Expand All @@ -316,12 +294,12 @@ CREATE TABLE IF NOT EXISTS `ecircdb`.`core_locusexpression` (
INDEX `core_locusexpression_locus_id_id_a32b9846_fk_core_locus_locus_id` (`locus_id_id` ASC),
CONSTRAINT `core_locusexpression_analysis_id_id_6cbe7a68_fk_core_anal`
FOREIGN KEY (`analysis_id_id`)
REFERENCES `ecircdb`.`core_analysis` (`analysis_id`),
REFERENCES `ecircdb_updated`.`core_analysis` (`analysis_id`),
CONSTRAINT `core_locusexpression_locus_id_id_a32b9846_fk_core_locus_locus_id`
FOREIGN KEY (`locus_id_id`)
REFERENCES `ecircdb`.`core_locus` (`locus_id`))
REFERENCES `ecircdb_updated`.`core_locus` (`locus_id`))
ENGINE = InnoDB
AUTO_INCREMENT = 492937
AUTO_INCREMENT = 11498045
DEFAULT CHARACTER SET = latin1;


Expand Down

0 comments on commit b787d46

Please sign in to comment.