From a4d553db21b184e230eb40516c2dd81bbe31b827 Mon Sep 17 00:00:00 2001 From: Taarly Date: Mon, 28 Apr 2025 15:14:35 +0200 Subject: [PATCH] added a second table called saved_logins --- Project.Persistence/SQLite.cs | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/Project.Persistence/SQLite.cs b/Project.Persistence/SQLite.cs index 01ccb40..30117d9 100644 --- a/Project.Persistence/SQLite.cs +++ b/Project.Persistence/SQLite.cs @@ -4,7 +4,10 @@ namespace Project.Persistence; public class SQLite { - private static string _dbPath = "C:/Users/Soi/Project_Keywi/logins.db"; + //filepath for home-pc: + //private static string _dbPath = "C:/Users/Soi/Project_Keywi/keywi.db"; + //filepath for work-laptop: + private static string _dbPath = "C:/Users/lowns/Desktop/keywi.db"; //KLASSENVARIABLEN ERSTELLEN //private static string loginname; @@ -25,6 +28,16 @@ public class SQLite ); "; command.ExecuteNonQuery(); + command.CommandText = + @" + CREATE TABLE IF NOT EXISTS SAVED_LOGINS ( + name STRING PRIMARY KEY NOT NULL, + pass STRING NOT NULL, + mail_username STRING NOT NULL, + note STRING + ); + "; + command.ExecuteNonQuery(); } //saves a new user to the table LOGINS ----- no input sanitization yet