Changeset 745 for trunk/app/config
- Timestamp:
- 09/01/08 12:14:13 (3 months ago)
- Files:
-
- 1 modified
-
trunk/app/config/sql/postgresql/results.sql (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/app/config/sql/postgresql/results.sql
r576 r745 6 6 test_id int NOT NULL REFERENCES tests(id) ON DELETE CASCADE, 7 7 vclassroom_id int NOT NULL REFERENCES vclassrooms(id) ON DELETE CASCADE, 8 created timestamp(0) with time zone DEFAULT now() NOT NULL, 9 correct smallint NOT NULL, 8 created timestamp(0) with time zone DEFAULT now() NOT NULL 10 9 PRIMARY KEY (user_id, test_id, vclassroom_id, question_id) 11 10 ); 12 13 -- CREATE TABLE results ( -- tests student results14 -- id serial NOT NULL UNIQUE,15 -- user_id int NOT NULL REFERENCES users(id) ON DELETE CASCADE,16 -- results smallint NOT NULL,17 -- test_id int NOT NULL REFERENCES tests(id) ON DELETE CASCADE,18 -- vclassroom_id int NOT NULL REFERENCES vclassrooms(id) ON DELETE CASCADE,19 -- created timestamp(0) with time zone DEFAULT now() NOT NULL,20 -- percentage decimal NOT NULL,21 -- PRIMARY KEY (user_id, test_id, vclassroom_id)22 -- );23 -- Test model tables ends24
