Yeah that will create multiple occurrences however how the settings tables work is SettingsID is a auto increment
public void Settings()
{
{
using (SQLiteCommand command = KaoriConnect.CreateCommand())
{
OpenConnection();
//command.CommandText = "SELECT name FROM sqlite_master WHERE name='Programs'";
//var name = command.ExecuteScalar();
//if (name != null && name.ToString() == "Programs")
// return;
// command.CommandText = "CREATE TABLE Programs (ProgID INT PRIMARY KEY , UserID TEXT , UserName TEXT , MachineID TEXT , Program TEXT , FilePath TEXT , Installed BOOLEAN ";
// command.ExecuteNonQuery();
// command.CommandText = "FOREIGN KEY(`UserID`) REFERENCES `User`(`ID`)";
// command.ExecuteNonQuery();
string createfulltableprograms = @"CREATE TABLE IF NOT EXISTS
[Settings] (
[SettingsID] INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT,
[ffmpegPath] TEXT NULL,
[SongPath] TEXT NULL,
[DefaultPath] TEXT NULL)";
command.CommandText = createfulltableprograms;
command.ExecuteNonQuery();
}
CloseConnection();
}
}