diff --git a/database/config/build.sql b/database/config/build.sql index b2cfa4a..d047bbe 100644 --- a/database/config/build.sql +++ b/database/config/build.sql @@ -4,7 +4,7 @@ DROP TABLE IF EXISTS students, teachers, grades, courses; CREATE TABLE IF NOT EXISTS courses( - course_id SERIAL PRIMARY KEY, + course_id SERIAL PRIMARY KEY, course_title TEXT NOT NULL ); @@ -20,11 +20,11 @@ INSERT INTO courses (course_id, course_title) VALUES(7,'English'); CREATE TABLE IF NOT EXISTS students( student_id SERIAL PRIMARY KEY, student_name TEXT NOT NULL , - student_birth INTEGER , + student_birth INTEGER NOT NULL, student_sex TEXT NOT NULL, - student_address TEXT , + student_address TEXT NOT NULL , student_EMAIL VARCHAR(320), - student_img VARCHAR(250) NoT NULL + student_img VARCHAR(250) NOT NULL ); diff --git a/database/queries/getData.js b/database/queries/getData.js index e69de29..8b30c48 100644 --- a/database/queries/getData.js +++ b/database/queries/getData.js @@ -0,0 +1,5 @@ +RTCPeerConnection.query(sql, (err, rows, fields) => { + if (err) console.log(err); + else console.log(rows); + response.send(rows); +}); diff --git a/public/grades.html b/public/grades.html index 68d9292..29a7f46 100644 --- a/public/grades.html +++ b/public/grades.html @@ -22,7 +22,7 @@