private void Initialize() { const string userTable = "CREATE TABLE users(" + "user_id INTEGER PRIMARY KEY AUTOINCREMENT," + "username VARCHAR(100) UNIQUE NOT NULL," + "password VARCHAR(20) NOT NULL," + "key VARCHAR(200)," + "uid VARCHAR(100)" + ")"; const string folderTable = "CREATE TABLE folders(" + "folder_id INTEGER PRIMARY KEY AUTOINCREMENT, " + "FolderName VARCHAR(50) NOT NULL, " + "user_id INT NOT NULL," + "timestamp DATETIME DEFAULT CURRENT_TIMESTAMP," + "FOREIGN KEY(user_id) REFERENCES users(user_id)" + ")"; const string fileTable = "CREATE TABLE files(" + "file_id INTEGER PRIMARY KEY AUTOINCREMENT," + "FileName VARCHAR(100) NOT NULL," + "Path VARCHAR(500) NOT NULL," + "folder_id INT NOT NULL," + "extension VARCHAR(10) NOT NULL," + "timestamp DATETIME DEFAULT CURRENT_TIMESTAMP," + "FOREIGN KEY(folder_id) REFERENCES folders(folder_id))"; //CREATE TABLES m_manager.ExecuteNonQuery(userTable); m_manager.ExecuteNonQuery(folderTable); m_manager.ExecuteNonQuery(fileTable); //ADD DEFAULT USER TO THE SYSTEM User user = new User("EnvelopeUser", "admin@123"); InsertUser(user); user = GetUser(); //ADD ROOT FOLDER ENTRY IN DB.folders Folder folder = new Folder("root", user); InsertFolder(folder); }