program finalizat

This commit is contained in:
andrei-mihnea-cerbu
2024-10-29 15:07:26 +02:00
parent ab1eaec413
commit 979539d3db
138 changed files with 14602 additions and 5068 deletions
+3 -2
View File
@@ -30,14 +30,15 @@ export class UserDatabase {
// Create the table if it doesn't exist
private createTableIfNotExists() {
const createTableQuery = `
CREATE TABLE IF NOT EXISTS users (
CREATE TABLE IF NOT EXISTS users (
id TEXT PRIMARY KEY,
name TEXT NOT NULL,
email TEXT NOT NULL UNIQUE,
salt TEXT NOT NULL,
hashedPassword TEXT NOT NULL,
departmentId TEXT NOT NULL,
app_type TEXT NOT NULL
app_type TEXT NOT NULL,
FOREIGN KEY (departmentId) REFERENCES departments(id) ON DELETE CASCADE
);
`;
this.db.exec(createTableQuery);