Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
ensembl-gh-mirror
ensembl-hive
Commits
80a78d51
Commit
80a78d51
authored
Oct 09, 2012
by
Leo Gordon
Browse files
turned two unique keys into primary keys (needed by BaseAdaptor)
parent
aec4e1f8
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
14 additions
and
6 deletions
+14
-6
sql/patch_2012-10-08.sql
sql/patch_2012-10-08.sql
+6
-0
sql/tables.sql
sql/tables.sql
+2
-2
sql/tables.sqlite
sql/tables.sqlite
+6
-4
No files found.
sql/patch_2012-10-08.sql
0 → 100644
View file @
80a78d51
#
replace
unique
keys
with
proper
primary
keys
in
two
tables
(
BaseAdaptor
needs
this
)
:
ALTER
TABLE
analysis_stats
DROP
KEY
`analysis_id`
,
ADD
PRIMARY
KEY
(
analysis_id
);
ALTER
TABLE
job_file
DROP
KEY
`job_retry`
,
ADD
PRIMARY
KEY
(
job_id
,
retry
);
sql/tables.sql
View file @
80a78d51
...
...
@@ -268,7 +268,7 @@ CREATE TABLE job_file (
stdout_file
varchar
(
255
),
stderr_file
varchar
(
255
),
UNIQUE
KEY
job_retry
(
job_id
,
retry
),
PRIMARY
KEY
job_retry
(
job_id
,
retry
),
INDEX
worker_id
(
worker_id
)
)
COLLATE
=
latin1_swedish_ci
ENGINE
=
InnoDB
;
...
...
@@ -355,7 +355,7 @@ CREATE TABLE analysis_stats (
last_update
datetime
NOT
NULL
default
'0000-00-00 00:00:00'
,
sync_lock
int
(
10
)
default
0
NOT
NULL
,
UNIQUE
KEY
(
analysis_id
)
PRIMARY
KEY
(
analysis_id
)
)
COLLATE
=
latin1_swedish_ci
ENGINE
=
InnoDB
;
...
...
sql/tables.sqlite
View file @
80a78d51
...
...
@@ -248,9 +248,10 @@ CREATE TABLE job_file (
retry int(10) NOT NULL,
worker_id INTEGER NOT NULL,
stdout_file varchar(255),
stderr_file varchar(255)
stderr_file varchar(255),
PRIMARY KEY (job_id, retry)
);
CREATE UNIQUE INDEX IF NOT EXISTS job_retry ON job_file (job_id, retry);
CREATE INDEX IF NOT EXISTS worker_idx ON job_file (worker_id);
...
...
@@ -330,9 +331,10 @@ CREATE TABLE analysis_stats (
avg_output_msec_per_job int(10) default 0 NOT NULL,
last_update datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
sync_lock int(10) NOT NULL DEFAULT 0
sync_lock int(10) NOT NULL DEFAULT 0,
PRIMARY KEY (analysis_id)
);
CREATE UNIQUE INDEX IF NOT EXISTS analysis_idx ON analysis_stats (analysis_id);
CREATE TABLE analysis_stats_monitor (
...
...
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