-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
A lot of tweaking and improving of the unipept-index feature
- Loading branch information
Showing
3 changed files
with
129 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0; | ||
SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0; | ||
SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='TRADITIONAL'; | ||
|
||
-- ----------------------------------------------------- | ||
-- Table `unipept`.`uniprot_entries` | ||
-- ----------------------------------------------------- | ||
ALTER TABLE uniprot_entries ADD INDEX fk_uniprot_entries_taxons (taxon_id ASC); | ||
ALTER TABLE uniprot_entries ADD UNIQUE INDEX idx_uniprot_entries_accession (uniprot_accession_number ASC); | ||
|
||
SET SQL_MODE=@OLD_SQL_MODE; | ||
SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS; | ||
SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0; | ||
SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0; | ||
SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='TRADITIONAL'; | ||
|
||
-- Drop the old database. This database will be recreated further on during this script! | ||
DROP DATABASE IF EXISTS `unipept`; | ||
|
||
CREATE SCHEMA IF NOT EXISTS `unipept` DEFAULT CHARACTER SET utf8 COLLATE utf8_general_ci ; | ||
USE `unipept` ; | ||
|
||
-- ----------------------------------------------------- | ||
-- Table `unipept`.`uniprot_entries` | ||
-- ----------------------------------------------------- | ||
CREATE TABLE IF NOT EXISTS `unipept`.`uniprot_entries` ( | ||
`id` INT UNSIGNED NOT NULL AUTO_INCREMENT , | ||
`uniprot_accession_number` CHAR(10) ASCII NOT NULL , | ||
`version` SMALLINT UNSIGNED NOT NULL , | ||
`taxon_id` MEDIUMINT UNSIGNED NOT NULL , | ||
`type` ENUM('swissprot', 'trembl') NOT NULL , | ||
`name`VARCHAR(150) NOT NULL , | ||
`protein` TEXT NOT NULL , | ||
`fa` TEXT NOT NULL , | ||
PRIMARY KEY (`id`)) | ||
ENGINE = InnoDB | ||
DEFAULT CHARACTER SET = ascii | ||
COLLATE = ascii_general_ci; | ||
|
||
SET SQL_MODE=@OLD_SQL_MODE; | ||
SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS; | ||
SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS; |