diff --git a/databases/init/students.sql b/databases/init/students.sql index 44ed2d3..63fffe4 100644 --- a/databases/init/students.sql +++ b/databases/init/students.sql @@ -1,5 +1,6 @@ create table promotions ( id integer primary key autoincrement, + name text, endyear integer, current integer ); @@ -9,6 +10,6 @@ create table students ( firstName text, lastName text, mail text, - promo integer, - foreign key(promo) references promo(id) + promotionId integer, + foreign key(promotionId) references promotions(id) ); \ No newline at end of file diff --git a/routes/(apps)/students/(_islands)/ConsultStudents.tsx b/routes/(apps)/students/(_islands)/ConsultStudents.tsx index 7b097db..da24056 100644 --- a/routes/(apps)/students/(_islands)/ConsultStudents.tsx +++ b/routes/(apps)/students/(_islands)/ConsultStudents.tsx @@ -9,7 +9,7 @@ interface Student { id: number; firstName: string; lastName: string; - email: string; + mail: string; promotionId: number; promotionName: string; } @@ -43,7 +43,7 @@ export default function ConsultStudents() { {error &&
{error}
} {data?.promotions.map((promo) => (| {student.id} | {student.firstName} | {student.lastName} | -{student.email} | +{student.mail} |