commitLog constant

String const commitLog

One row per atKey, newest-wins: a new commit for an atKey replaces that atKey's row (the canonical CommitLogKeyStore collapse — the log answers "each key's latest commit", not the history).

Implementation

static const String commitLog = '''
CREATE TABLE IF NOT EXISTS commit_log (
atkey     TEXT PRIMARY KEY NOT NULL,
commit_id INTEGER NOT NULL,
operation TEXT NOT NULL CHECK (operation IN ('+', '#', '*', '-')),
op_time   INTEGER
) WITHOUT ROWID;
''';