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
92801668
Commit
92801668
authored
14 years ago
by
Andreas Kusalananda Kähäri
Browse files
Options
Downloads
Patches
Plain Diff
Create the full_analysis_description view. It is beautiful.
parent
87da26c1
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
+17
-8
17 additions, 8 deletions
misc-scripts/production_database/sql/tables.sql
with
17 additions
and
8 deletions
misc-scripts/production_database/sql/tables.sql
+
17
−
8
View file @
92801668
...
...
@@ -105,7 +105,7 @@ CREATE TABLE analysis_web_data (
displayable
BOOLEAN
,
UNIQUE
INDEX
uniq_idx
(
analysis_description_id
,
web_data_id
,
species_id
,
db_type
)
UNIQUE
INDEX
uniq_idx
(
species_id
,
db_type
,
analysis_description_id
)
);
-- The 'web_data' table.
...
...
@@ -128,10 +128,19 @@ FROM species
JOIN
db
USING
(
species_id
)
WHERE
species
.
is_current
=
1
;
-- CREATE VIEW readable_web_data AS
-- SELECT CONCAT('{',
-- GROUP_CONCAT(data SEPARATOR ','),
-- '}') AS web_data
-- FROM analysis_web_data awd
-- JOIN web_data wd USING (web_data_id)
-- GROUP BY
CREATE
VIEW
full_analysis_description
AS
SELECT
list
.
full_db_name
AS
full_db_name
,
ad
.
logic_name
AS
logic_name
,
ad
.
description
AS
description
,
ad
.
display_label
AS
display_label
,
awd
.
displayable
AS
displayable
,
wd
.
data
AS
web_data
FROM
db_list
list
JOIN
db
USING
(
db_id
)
JOIN
analysis_web_data
awd
ON
(
db
.
species_id
=
awd
.
species_id
AND
db
.
db_type
=
awd
.
db_type
)
JOIN
analysis_description
ad
USING
(
analysis_description_id
)
LEFT
JOIN
web_data
wd
USING
(
web_data_id
)
WHERE
db
.
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