Changeset 395 for trunk/app/config

Show
Ignore:
Timestamp:
04/14/08 10:20:01 (8 months ago)
Author:
aarkerio
Message:

Fixed test controller

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • trunk/app/config/sql/karamelo_postgres.sql

    r386 r395  
    318318    "created" timestamp(0) with time zone DEFAULT now() NOT NULL, 
    319319    "status" smallint DEFAULT 0 NOT NULL, 
    320     "user_id" integer NOT NULL REFERENCES users(id) ON DELETE CASCADE, 
    321     "ecourse_id" integer NOT NULL REFERENCES ecourses(id) ON DELETE CASCADE, 
    322     "secret" varchar(6),   -- secreto code to allow students register by themselves 
    323     "access" smallint NOT NULL DEFAULT 0 
     320    "user_id" int NOT NULL REFERENCES users(id) ON DELETE CASCADE, 
     321    "ecourse_id" int NOT NULL REFERENCES ecourses(id) ON DELETE CASCADE, 
     322    "secret" varchar(6),   -- secret code to allow students register by themselves 
     323    "access" smallint NOT NULL DEFAULT 0 -- public / only with code 
    324324); 
    325325 
     
    569569CREATE TABLE "tests_vclassrooms" ( 
    570570 "id" serial PRIMARY KEY, 
    571  "test_id" int NOT NULL REFERENCES tests(id), 
    572  "vclassroom_id" int NOT NULL REFERENCES vclassrooms(id), 
     571 "test_id" int NOT NULL REFERENCES tests(id) ON DELETE CASCADE, 
     572 "vclassroom_id" int NOT NULL REFERENCES vclassrooms(id) ON DELETE CASCADE, 
    573573  UNIQUE  ("test_id", "vclassroom_id") 
    574574);