Commit 80a78d51 authored by Leo Gordon's avatar Leo Gordon
Browse files

turned two unique keys into primary keys (needed by BaseAdaptor)

parent aec4e1f8
# 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);
......@@ -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;
......
......@@ -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 (
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment