Changeset 576 for trunk/app/config

Show
Ignore:
Timestamp:
05/30/08 22:31:24 (6 months ago)
Author:
aarkerio
Message:

Update record

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • trunk/app/config/sql/postgresql/results.sql

    r574 r576  
    11CREATE TABLE results (  -- tests student results 
    22   id serial NOT NULL UNIQUE, 
    3    user_id int NOT NULL REFERENCES users(id) ON DELETE CASCADE, 
    4    question_id int NOT NULL, 
    5    answer_id smallint NOT NULL, 
     3   user_id int NOT NULL REFERENCES users(id) ON DELETE CASCADE,    -- student id 
     4   question_id int NOT NULL REFERENCES questions(id) ON DELETE CASCADE, 
     5   answer_id int NOT NULL REFERENCES answers(id) ON DELETE CASCADE, 
    66   test_id int NOT NULL REFERENCES tests(id) ON DELETE CASCADE, 
    77   vclassroom_id int NOT NULL REFERENCES vclassrooms(id) ON DELETE CASCADE, 
    88   created timestamp(0) with time zone DEFAULT now() NOT NULL, 
     9   correct smallint NOT NULL, 
    910   PRIMARY KEY (user_id, test_id, vclassroom_id, question_id) 
    1011);