added a second table called saved_logins

This commit is contained in:
Taarly 2025-04-28 15:14:35 +02:00
parent a6ba0f388f
commit a4d553db21

View File

@ -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