~azzar1/unity/add-show-desktop-key

« back to all changes in this revision

Viewing changes to userdb/users.sql

Updated the exercises to be loaded from the database, not a local file.

This updated fixes some things broken in my previous commit, and now
it should leave the worksheets in a viewable (not working) state.

I have also updated ivle-addexercise and the database schema to reflect
the schema of an exercise.

Show diffs side-by-side

added added

removed removed

Lines of Context:
246
246
    problemid   TEXT REFERENCES problem (identifier) NOT NULL,
247
247
    description TEXT,
248
248
    seq_no      INT4,
 
249
    function    TEXT,
 
250
    stdin       TEXT,
249
251
    PRIMARY KEY (problemid, suiteid)
250
252
);
251
253
 
252
254
CREATE TABLE test_case (
253
 
    testid      SERIAL NOT NULL,
 
255
    testid          SERIAL UNIQUE NOT NULL,
 
256
    suiteid         INT4 REFERENCES test_suite (suiteid) NOT NULL,
 
257
    passmsg         TEXT,
 
258
    failmsg         TEXT,
 
259
    test_default    TEXT,
 
260
    seq_no          INT4,
 
261
    PRIMARY KEY (testid, suiteid)
 
262
);
 
263
 
 
264
CREATE TABLE suite_variables (
 
265
    varid       SERIAL PRIMARY KEY NOT NULL,
254
266
    suiteid     INT4 REFERENCES test_suite (suiteid) NOT NULL,
255
 
    passmsg     TEXT,
256
 
    failmsg     TEXT,
257
 
    init        TEXT,
258
 
    code_type   TEXT,
259
 
    code        TEXT,
260
 
    testtype    TEXT,
261
 
    seq_no      INT4,
262
 
    PRIMARY KEY (testid, suiteid)
 
267
    var_name    TEXT,
 
268
    var_value   TEXT,
 
269
    var_type    TEXT NOT NULL,
 
270
    arg_no      INT4
 
271
);
 
272
 
 
273
CREATE TABLE test_case_parts (
 
274
    partid       SERIAL PRIMARY KEY NOT NULL,
 
275
    testid          INT4 REFERENCES test_case (testid) NOT NULL,
 
276
    part_type       TEXT,
 
277
    test_type       TEXT,
 
278
    data            TEXT,
 
279
    filename        TEXT
263
280
);