program finalizat
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user