Minor fix for DB (working)

This commit is contained in:
Clayzxr
2025-01-22 11:00:18 +01:00
parent 5e75c688c8
commit d767cb0898
3 changed files with 8 additions and 7 deletions
@@ -12,7 +12,7 @@ export const handler: Handlers = {
const students = connection.database
.prepare(
`select userId, firstName, lastName, mail, promo from students`,
`select userId, firstName, lastName, mail, promotionId from students`,
)
.all();
@@ -56,7 +56,7 @@ export const handler: Handlers = {
console.log(`Promotion ID for "${promoName}":`, promoId);
const insertQuery = connection.database.prepare(
"INSERT INTO students (firstName, lastName, email, promotionId) VALUES (?, ?, ?, ?)",
"INSERT INTO students (firstName, lastName, mail, promotionId) VALUES (?, ?, ?, ?)",
);
for (const student of data) {