Changeset 574 for trunk/app/config

Show
Ignore:
Timestamp:
05/27/08 21:49:48 (6 months ago)
Author:
aarkerio
Message:

Update record student

Files:
1 modified

Legend:

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

    r570 r574  
    22   id serial NOT NULL UNIQUE, 
    33   user_id int NOT NULL REFERENCES users(id) ON DELETE CASCADE, 
    4    results smallint NOT NULL, 
     4   question_id int NOT NULL, 
     5   answer_id smallint NOT NULL, 
    56   test_id int NOT NULL REFERENCES tests(id) ON DELETE CASCADE, 
    67   vclassroom_id int NOT NULL REFERENCES vclassrooms(id) ON DELETE CASCADE, 
    78   created timestamp(0) with time zone DEFAULT now() NOT NULL, 
    8    percentage decimal NOT NULL, 
    9    PRIMARY KEY (user_id, test_id, vclassroom_id) 
     9   PRIMARY KEY (user_id, test_id, vclassroom_id, question_id) 
    1010); 
     11 
     12-- CREATE TABLE results (  -- tests student results 
     13--   id serial NOT NULL UNIQUE, 
     14--   user_id int NOT NULL REFERENCES users(id) ON DELETE CASCADE, 
     15--   results smallint NOT NULL, 
     16--   test_id int NOT NULL REFERENCES tests(id) ON DELETE CASCADE, 
     17--   vclassroom_id int NOT NULL REFERENCES vclassrooms(id) ON DELETE CASCADE, 
     18--   created timestamp(0) with time zone DEFAULT now() NOT NULL, 
     19--   percentage decimal NOT NULL, 
     20--   PRIMARY KEY (user_id, test_id, vclassroom_id) 
     21-- ); 
    1122-- Test model tables ends 
    1223