Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Open sidebar
ensembl-gh-mirror
ensembl
Commits
259897f0
Commit
259897f0
authored
Apr 15, 2013
by
Magali Ruffier
Browse files
ENSCORESW-371
: schema support for associated xrefs
parent
8faea19a
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
59 additions
and
0 deletions
+59
-0
sql/patch_71_72_b.sql
sql/patch_71_72_b.sql
+41
-0
sql/table.sql
sql/table.sql
+18
-0
No files found.
sql/patch_71_72_b.sql
0 → 100644
View file @
259897f0
#
patch_71_72_b
.
sql
#
#
Title
:
Create
associated_xref
table
#
#
Description
:
#
Create
table
associated_xref
for
associating
object
xrefs
with
an
associated
#
annotation
(
eg
Gene
Ontology
Annotation
Extensions
)
given
a
source
xref
and
#
condition
.
CREATE
TABLE
associated_xref
(
associated_xref_id
INT
(
10
)
UNSIGNED
NOT
NULL
AUTO_INCREMENT
,
object_xref_id
INT
(
10
)
UNSIGNED
DEFAULT
'0'
NOT
NULL
,
xref_id
INT
(
10
)
UNSIGNED
DEFAULT
'0'
NOT
NULL
,
source_xref_id
INT
(
10
)
UNSIGNED
DEFAULT
NULL
,
condition_type
VARCHAR
(
128
)
DEFAULT
NULL
,
associated_group_id
INT
(
10
)
UNSIGNED
DEFAULT
NULL
,
rank
INT
(
10
)
UNSIGNED
DEFAULT
'0'
,
PRIMARY
KEY
(
associated_xref_id
),
KEY
associated_source_idx
(
source_xref_id
),
KEY
associated_object_idx
(
object_xref_id
),
KEY
associated_idx
(
xref_id
),
FOREIGN
KEY
associated_group_idx
(
associated_group_id
)
REFERENCES
associated_group
(
associated_group_id
),
UNIQUE
KEY
object_associated_source_type_idx
(
object_xref_id
,
xref_id
,
source_xref_id
,
condition_type
,
associated_group_id
)
)
COLLATE
=
latin1_swedish_ci
ENGINE
=
MyISAM
;
CREATE
TABLE
associated_group
(
associated_group_id
INT
(
10
)
UNSIGNED
NOT
NULL
AUTO_INCREMENT
,
description
VARCHAR
(
128
)
DEFAULT
NULL
,
PRIMARY
KEY
(
associated_group_id
)
)
COLLATE
=
latin1_swedish_ci
ENGINE
=
MyISAM
;
#
Patch
identifier
INSERT
INTO
meta
(
species_id
,
meta_key
,
meta_value
)
VALUES
(
NULL
,
'patch'
,
'patch_71_72_b.sql|associated_xref'
);
sql/table.sql
View file @
259897f0
...
...
@@ -510,6 +510,8 @@ INSERT INTO meta (species_id, meta_key, meta_value) VALUES
#
NOTE
:
Avoid
line
-
breaks
in
values
.
INSERT
INTO
meta
(
species_id
,
meta_key
,
meta_value
)
VALUES
(
NULL
,
'patch'
,
'patch_71_72_a.sql|schema_version'
);
INSERT
INTO
meta
(
species_id
,
meta_key
,
meta_value
)
VALUES
(
NULL
,
'patch'
,
'patch_71_72_b.sql|associated_xref'
);
/**
@table meta_coord
...
...
@@ -2425,6 +2427,22 @@ CREATE TABLE associated_xref (
)
COLLATE
=
latin1_swedish_ci
ENGINE
=
MyISAM
;
/**
@table associated_group
@associated_group_id
@description
*/
CREATE
TABLE
associated_group
(
associated_group_id
INT
(
10
)
UNSIGNED
NOT
NULL
AUTO_INCREMENT
,
description
VARCHAR
(
128
)
DEFAULT
NULL
,
PRIMARY
KEY
(
associated_group_id
)
)
COLLATE
=
latin1_swedish_ci
ENGINE
=
MyISAM
;
/**
@table seq_region_synonym
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment