Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion schema/class.sql
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
CREATE TABLE "public"."class" (
"class_no" integer DEFAULT nextval('public.class_no_seq'::regclass) NOT NULL,
"class_no" text DEFAULT nextval('public.class_no_seq'::regclass) NOT NULL,
"class_name" text NOT NULL,
"grade" integer NOT NULL,
"student_limit" integer NOT NULL,
CONSTRAINT "class_pkey" PRIMARY KEY (class_no),
CONSTRAINT "class_grade_check" CHECK (grade > 0 AND grade <= 12)
);
Expand Down
1 change: 1 addition & 0 deletions schema/student.sql
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ CREATE TABLE "public"."student" (
"first_name" text NOT NULL,
"last_name" text NOT NULL,
"gender" text NOT NULL,
"email" text NOT NULL,
CONSTRAINT "student_pkey" PRIMARY KEY (student_no),
CONSTRAINT "student_gender_check" CHECK (gender = ANY (ARRAY['M'::text, 'F'::text]))
);
Expand Down