1
DO NOT APPLY THIS MIGRATION WITHOUT READING THE FOLLOWING;
4
DROP TABLE problem_attempt_breakdown;
5
DROP TABLE problem_test_case_tag;
6
DROP TABLE problem_tag;
7
DROP TABLE problem_test_case;
8
DROP TABLE problem_prerequisite;
10
ALTER TABLE problem_attempt DROP CONSTRAINT problem_attempt_problemid_fkey;
11
ALTER TABLE problem_save DROP CONSTRAINT problem_save_problemid_fkey;
12
ALTER TABLE worksheet_problem DROP CONSTRAINT worksheet_problem_problemid_fkey;
14
ALTER TABLE problem ADD COLUMN name TEXT;
15
ALTER TABLE problem ADD COLUMN description TEXT;
16
ALTER TABLE problem ADD COLUMN partial TEXT;
17
ALTER TABLE problem ADD COLUMN solution TEXT;
18
ALTER TABLE problem ADD COLUMN include TEXT;
19
ALTER TABLE problem ADD COLUMN num_rows INT4;
20
ALTER TABLE problem DROP COLUMN spec;
21
ALTER TABLE problem DROP COLUMN problemid;
23
ALTER TABLE problem_attempt ADD COLUMN worksheetid INT4 REFERENCES worksheet (worksheetid);
24
ALTER TABLE problem_attempt DROP COLUMN problemid;
25
ALTER TABLE problem_attempt ADD COLUMN problemid TEXT REFERENCES problem (identifier);
27
ALTER TABLE problem_save ADD COLUMN worksheetid INT4 REFERENCES worksheet (worksheetid);
28
ALTER TABLE problem_save DROP COLUMN problemid;
29
ALTER TABLE problem_save ADD COLUMN problemid TEXT references problem (identifier);
31
ALTER TABLE worksheet_problem DROP COLUMN problemid;
32
ALTER TABLE worksheet_problem ADD COLUMN problemid TEXT REFERENCES problem (identifier);
34
CREATE TABLE test_suite (
35
suiteid SERIAL UNIQUE NOT NULL,
36
problemid TEXT REFERENCES problem (identifier) NOT NULL,
39
PRIMARY KEY (problemid, suiteid)
42
CREATE TABLE test_case (
43
testid SERIAL UNIQUE NOT NULL,
44
suiteid INT4 REFERENCES test_suite (suiteid) NOT NULL,
52
PRIMARY KEY (testid, suiteid)
55
ALTER TABLE worksheet ADD COLUMN offeringid INT4 REFERENCES offering (offeringid) NOT NULL;