Skip to content

Commit 19b2aa0

Browse files
committed
fix: add meta table to frontend schema, fix sql.js API call
1 parent dae2514 commit 19b2aa0

2 files changed

Lines changed: 5 additions & 0 deletions

File tree

frontend/js/db.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@ async function _initEmpty() {
4747
const SQL = await _ensureSqlJs();
4848
_db = new SQL.Database();
4949
_db.exec(_schemaSql());
50+
_db.exec("CREATE TABLE IF NOT EXISTS meta (key TEXT PRIMARY KEY, value TEXT)");
5051
}
5152

5253
function _exportDB() {

frontend/js/schema.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,5 +50,9 @@ CREATE TABLE IF NOT EXISTS all_courses (
5050
last_seen_at TEXT,
5151
PRIMARY KEY (course_id, term)
5252
);
53+
CREATE TABLE IF NOT EXISTS meta (
54+
key TEXT PRIMARY KEY,
55+
value TEXT
56+
);
5357
`,
5458
};

0 commit comments

Comments
 (0)