Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
E
ensembl
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Wiki
Requirements
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package Registry
Container Registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Tamara El Naboulsi
ensembl
Commits
78177455
Commit
78177455
authored
12 years ago
by
Magali Ruffier
Browse files
Options
Downloads
Patches
Plain Diff
updated file to match current latest production database schema on the staging server
parent
b5f28137
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
misc-scripts/production_database/sql/tables.sql
+132
-7
132 additions, 7 deletions
misc-scripts/production_database/sql/tables.sql
with
132 additions
and
7 deletions
misc-scripts/production_database/sql/tables.sql
+
132
−
7
View file @
78177455
--
Schema of tables *not* added by the bootstrap_master.pl script.
--
Table schema for the production database
-- NB: Additional tables are added by the web team to support storing
-- declarations of intentions etc. Those tables are not even mentioned
-- here.
-- The 'species' table.
-- Lists the species for which there is a Core database.
...
...
@@ -17,6 +14,7 @@ CREATE TABLE species (
taxon
VARCHAR
(
20
),
species_prefix
VARCHAR
(
20
),
is_current
BOOLEAN
NOT
NULL
DEFAULT
true
,
attrib_type_id
SMALLINT
(
5
)
UNSIGNED
DEFAULT
NULL
,
-- Columns for the web interface:
created_by
INTEGER
,
...
...
@@ -139,7 +137,9 @@ CREATE TABLE analysis_description (
logic_name
VARCHAR
(
128
)
NOT
NULL
,
description
TEXT
,
display_label
VARCHAR
(
256
)
NOT
NULL
,
db_version
TINYINT
(
1
)
NOT
NULL
DEFAULT
'1'
,
is_current
BOOLEAN
NOT
NULL
DEFAULT
true
,
default_web_data_id
INT
(
10
)
UNSIGNED
DEFAULT
NULL
,
-- Columns for the web interface:
created_by
INTEGER
,
...
...
@@ -162,8 +162,9 @@ CREATE TABLE analysis_web_data (
web_data_id
INTEGER
UNSIGNED
DEFAULT
NULL
,
species_id
INTEGER
UNSIGNED
NOT
NULL
,
db_type
SET
(
'cdna'
,
'core'
,
'funcgen'
,
'otherfeatures'
,
'rnaseq'
,
'vega'
)
db_type
ENUM
(
'cdna'
,
'core'
,
'funcgen'
,
'otherfeatures'
,
'rnaseq'
,
'vega'
,
'presite'
,
'sangervega'
)
NOT
NULL
DEFAULT
'core'
,
displayable
BOOLEAN
NOT
NULL
DEFAULT
true
,
...
...
@@ -175,7 +176,9 @@ CREATE TABLE analysis_web_data (
modified_at
DATETIME
,
PRIMARY
KEY
(
analysis_web_data_id
),
UNIQUE
INDEX
uniq_idx
(
species_id
,
db_type
,
analysis_description_id
)
UNIQUE
INDEX
uniq_idx
(
species_id
,
db_type
,
analysis_description_id
),
INDEX
ad_idx
(
analysis_description_id
),
INDEX
wd_idx
(
web_data_id
)
);
-- The 'web_data' table.
...
...
@@ -196,6 +199,128 @@ CREATE TABLE web_data (
PRIMARY
KEY
(
web_data_id
)
);
-- The 'master_attrib_type' table.
-- Lists the existing attrib_types
CREATE
TABLE
master_attrib_type
(
attrib_type_id
SMALLINT
(
5
)
unsigned
NOT
NULL
AUTO_INCREMENT
,
code
VARCHAR
(
15
)
NOT
NULL
DEFAULT
''
,
name
VARCHAR
(
255
)
NOT
NULL
DEFAULT
''
,
description
TEXT
,
is_current
TINYINT
(
1
)
NOT
NULL
DEFAULT
'1'
,
-- Columns for the web interface:
created_by
INTEGER
,
created_at
DATETIME
,
modified_by
INTEGER
,
modified_at
DATETIME
,
PRIMARY
KEY
(
attrib_type_id
),
UNIQUE
INDEX
code_idx
(
code
)
);
-- The 'master_external_db' table.
-- Lists the existing external_dbs
CREATE
TABLE
master_external_db
(
external_db_id
INT
(
10
)
UNSIGNED
NOT
NULL
AUTO_INCREMENT
,
db_name
VARCHAR
(
100
)
NOT
NULL
,
db_release
VARCHAR
(
255
)
DEFAULT
NULL
,
status
ENUM
(
'KNOWNXREF'
,
'KNOWN'
,
'XREF'
,
'PRED'
,
'ORTH'
,
'PSEUDO'
)
NOT
NULL
,
priority
INT
(
11
)
NOT
NULL
,
db_display_name
VARCHAR
(
255
)
DEFAULT
NULL
,
type
ENUM
(
'ARRAY'
,
'ALT_TRANS'
,
'ALT_GENE'
,
'MISC'
,
'LIT'
,
'PRIMARY_DB_SYNONYM'
,
'ENSEMBL'
)
DEFAULT
NULL
,
secondary_db_name
VARCHAR
(
255
)
DEFAULT
NULL
,
secondary_db_table
VARCHAR
(
255
)
DEFAULT
NULL
,
description
TEXT
,
is_current
TINYINT
(
1
)
NOT
NULL
DEFAULT
'1'
,
-- Columns for the web interface:
created_by
INTEGER
,
created_at
DATETIME
,
modified_by
INTEGER
,
modified_at
DATETIME
,
PRIMARY
KEY
(
external_db_id
),
UNIQUE
INDEX
db_name_idx
(
db_name
,
db_release
,
is_current
)
);
-- The 'master_misc_set' table
-- Lists the existing misc_sets
CREATE
TABLE
master_misc_set
(
misc_set_id
SMALLINT
(
5
)
UNSIGNED
NOT
NULL
AUTO_INCREMENT
,
code
VARCHAR
(
25
)
NOT
NULL
DEFAULT
''
,
name
VARCHAR
(
255
)
NOT
NULL
DEFAULT
''
,
description
TEXT
NOT
NULL
,
max_length
INT
(
10
)
UNSIGNED
NOT
NULL
,
is_current
TINYINT
(
1
)
NOT
NULL
DEFAULT
'1'
,
-- Columns for the web interface:
created_by
INTEGER
,
created_at
DATETIME
,
modified_by
INTEGER
,
modified_at
DATETIME
,
PRIMARY
KEY
(
misc_set_id
),
UNIQUE
INDEX
code_idx
(
code
)
);
-- The 'master_unmapped_reason' table
-- Lists the existing unmapped_reasons
CREATE
TABLE
master_unmapped_reason
(
unmapped_reason_id
SMALLINT
(
5
)
UNSIGNED
NOT
NULL
AUTO_INCREMENT
,
summary_description
VARCHAR
(
255
)
DEFAULT
NULL
,
full_description
VARCHAR
(
255
)
DEFAULT
NULL
,
is_current
TINYINT
(
1
)
NOT
NULL
DEFAULT
'1'
,
-- Columns for the web interface:
created_by
INTEGER
,
created_at
DATETIME
,
modified_by
INTEGER
,
modified_at
DATETIME
,
PRIMARY
KEY
(
unmapped_reason_id
)
);
-- The 'changelog' and 'changelog_species' tables
-- Used for web purposes to store release related information
CREATE
TABLE
changelog
(
changelog_id
INT
(
10
)
UNSIGNED
NOT
NULL
AUTO_INCREMENT
,
release_id
INT
(
11
)
DEFAULT
NULL
,
title
VARCHAR
(
128
)
DEFAULT
NULL
,
content
TEXT
,
notes
TEXT
,
status
ENUM
(
'declared'
,
'handed_over'
,
'postponed'
,
'cancelled'
)
NOT
NULL
DEFAULT
'declared'
,
team
ENUM
(
'Compara'
,
'Core'
,
'Funcgen'
,
'Genebuild'
,
'Outreach'
,
'Variation'
,
'Web'
,
'EnsemblGenomes'
,
'Wormbase'
,
'Production'
)
DEFAULT
NULL
,
assembly
ENUM
(
'N'
,
'Y'
)
NOT
NULL
DEFAULT
'N'
,
gene_set
ENUM
(
'N'
,
'Y'
)
NOT
NULL
DEFAULT
'N'
,
repeat_masking
ENUM
(
'N'
,
'Y'
)
NOT
NULL
DEFAULT
'N'
,
stable_id_mapping
ENUM
(
'N'
,
'Y'
)
NOT
NULL
DEFAULT
'N'
,
affy_mapping
ENUM
(
'N'
,
'Y'
)
NOT
NULL
DEFAULT
'N'
,
biomart_affected
ENUM
(
'N'
,
'Y'
)
NOT
NULL
DEFAULT
'N'
,
variation_pos_changed
ENUM
(
'N'
,
'Y'
)
NOT
NULL
DEFAULT
'N'
,
db_status
ENUM
(
'N/A'
,
'unchanged'
,
'patched'
,
'new'
)
NOT
NULL
DEFAULT
'N/A'
,
db_type_affected
SET
(
'cdna'
,
'core'
,
'funcgen'
,
'otherfeatures'
,
'rnaseq'
,
'variation'
,
'vega'
)
DEFAULT
NULL
,
priority
TINYINT
(
1
)
NOT
NULL
DEFAULT
'2'
,
is_current
TINYINT
(
1
)
NOT
NULL
DEFAULT
'1'
,
-- Columns for the web interface:
created_by
INTEGER
,
created_at
DATETIME
,
modified_by
INTEGER
,
modified_at
DATETIME
,
PRIMARY
KEY
(
changelog_id
)
);
-- Connects the 'changelog' and the 'species' tables.
CREATE
TABLE
changelog_species
(
changelog_id
INT
(
11
)
NOT
NULL
DEFAULT
'0'
,
species_id
INT
(
11
)
NOT
NULL
DEFAULT
'0'
,
PRIMARY
KEY
(
changelog_id
,
species_id
)
);
-- VIEWS
-- The 'db_list' view provides the full database names for all databases
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment