Skip to content

Commit 8a378b6

Browse files
authored
feature: update schema (#2)
1 parent 6bacdb6 commit 8a378b6

2 files changed

Lines changed: 3 additions & 1 deletion

File tree

schema/class.sql

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
CREATE TABLE "public"."class" (
2-
"class_no" integer DEFAULT nextval('public.class_no_seq'::regclass) NOT NULL,
2+
"class_no" text DEFAULT nextval('public.class_no_seq'::regclass) NOT NULL,
33
"class_name" text NOT NULL,
44
"grade" integer NOT NULL,
5+
"student_limit" integer NOT NULL,
56
CONSTRAINT "class_pkey" PRIMARY KEY (class_no),
67
CONSTRAINT "class_grade_check" CHECK (grade > 0 AND grade <= 12)
78
);

schema/student.sql

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ CREATE TABLE "public"."student" (
44
"first_name" text NOT NULL,
55
"last_name" text NOT NULL,
66
"gender" text NOT NULL,
7+
"email" text NOT NULL,
78
CONSTRAINT "student_pkey" PRIMARY KEY (student_no),
89
CONSTRAINT "student_gender_check" CHECK (gender = ANY (ARRAY['M'::text, 'F'::text]))
910
);

0 commit comments

Comments
 (0)