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
Iterations
Wiki
Requirements
Jira
Code
Merge requests
1
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
ensembl-gh-mirror
ensembl
Commits
8bf8e02b
Commit
8bf8e02b
authored
14 years ago
by
Andreas Kusalananda Kähäri
Browse files
Options
Downloads
Patches
Plain Diff
Add the four master table views that selects everything from the
corresponding table for which is_current is 1.
parent
7dbd3b09
No related branches found
Branches containing commit
No related tags found
Tags containing commit
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
+47
-0
47 additions, 0 deletions
misc-scripts/production_database/sql/tables.sql
with
47 additions
and
0 deletions
misc-scripts/production_database/sql/tables.sql
+
47
−
0
View file @
8bf8e02b
...
...
@@ -158,3 +158,50 @@ FROM analysis_description ad
JOIN
species
s
USING
(
species_id
)
LEFT
JOIN
web_data
wd
USING
(
web_data_id
)
WHERE
s
.
is_current
=
1
;
-- Views for the master tables. These are simply selecting the entries
-- from the corresponding master table that have is_current = 1.
CREATE
VIEW
attrib_type
AS
SELECT
attrib_type_id
AS
attrib_type_id
,
code
AS
code
,
name
AS
name
,
description
AS
description
FROM
master_attrib_type
WHERE
is_current
=
1
;
CREATE
VIEW
external_db
AS
SELECT
external_db_id
AS
external_db_id
,
db_name
AS
db_name
,
db_release
AS
db_release
,
status
AS
status
,
dbprimary_acc_linkable
AS
dbprimary_acc_linkable
,
display_label_linkable
AS
display_label_linkable
,
priority
AS
priority
,
db_display_name
AS
db_display_name
,
type
AS
type
,
secondary_db_name
AS
secondary_db_name
,
secondary_db_table
AS
secondary_db_table
,
description
AS
description
FROM
master_external_db
WHERE
is_current
=
1
;
CREATE
VIEW
misc_set
AS
SELECT
misc_set_id
AS
misc_set_id
,
code
AS
code
,
name
AS
name
,
description
AS
description
,
max_length
AS
max_length
FROM
master_misc_set
WHERE
is_current
=
1
;
CREATE
VIEW
unmapped_reason
AS
SELECT
unmapped_reason_id
AS
unmapped_reason_id
,
summary_description
AS
summary_description
,
full_description
AS
full_description
FROM
master_unmapped_reason
WHERE
is_current
=
1
;
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