Skip to content

Commit db53d12

Browse files
authored
fix: use default (#4)
1 parent ece9348 commit db53d12

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

schema/class.sql

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ CREATE TABLE "public"."class" (
22
"class_no" integer 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,
5+
"min_credit" integer NOT NULL DEFAULT 0,
66
CONSTRAINT "class_pkey" PRIMARY KEY (class_no),
77
CONSTRAINT "class_grade_check" CHECK (grade > 0 AND grade <= 12)
88
);

schema/student.sql

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +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,
7+
"email" text NOT NULL DEFAULT '',
88
CONSTRAINT "student_pkey" PRIMARY KEY (student_no),
99
CONSTRAINT "student_gender_check" CHECK (gender = ANY (ARRAY['M'::text, 'F'::text]))
1010
);

0 commit comments

Comments
 (0)