private Task CreateTable() { const string sql = "CREATE TABLE IF NOT EXISTS labels (id TEXT PRIMARY KEY, key TEXT, value TEXT, description TEXT, color TEXT);"; var command = new SqlCommand(sql, new List <KeyValuePair <string, string> >()); return(_sqliteStorage.ExecuteNonQueryAsync(command)); }
private Task CreateTable() { const string sql = "CREATE TABLE IF NOT EXISTS page_labels (page_id TEXT,label_id TEXT, PRIMARY KEY (page_id, label_id));"; // const string sql = // "CREATE TABLE IF NOT EXISTS page_labels (page_id TEXT,label_id TEXT,PRIMARY KEY (page_id, label_id),FOREIGN KEY (page_id) REFERENCES pages(id) on delete CASCADE,FOREIGN KEY (label_id) REFERENCES labels(id) on delete CASCADE);"; var command = new SqlCommand(sql, new List <KeyValuePair <string, string> >()); return(_sqliteStorage.ExecuteNonQueryAsync(command)); }