feat! drop "status" column from event queue

It's not currently used. It may be necessary to add this later, but
for now it's better to avoid having the cruft.

Signed-off-by: Lars Wirzenius <liw@liw.fi>
This commit is contained in:
Lars Wirzenius
2024-07-16 20:44:43 +03:00
parent fbb123d953
commit ddbac4fd6e
+3 -9
View File
@@ -58,7 +58,7 @@ impl Db {
fn create_tables(&self) -> Result<(), DbError> {
const TABLES: &[&str] = &[
"CREATE TABLE IF NOT EXISTS counter_test (counter INT)",
"CREATE TABLE IF NOT EXISTS event_queue (id TEXT PRIMARY KEY, timestamp TEXT, event TEXT, status TEXT)",
"CREATE TABLE IF NOT EXISTS event_queue (id TEXT PRIMARY KEY, timestamp TEXT, event TEXT)",
"CREATE TABLE IF NOT EXISTS ci_runs (run_id TEXT PRIMARY KEY, json TEXT)",
];
@@ -237,11 +237,9 @@ impl Db {
let id = QueueId::default();
let ts = now();
let status = "FIXME";
let mut insert = self.prepare(
"INSERT INTO event_queue (id, timestamp, event, status) VALUES (:id, :ts, :e, :s)",
)?;
let mut insert =
self.prepare("INSERT INTO event_queue (id, timestamp, event) VALUES (:id, :ts, :e)")?;
insert
.stmt
.bind((":id", id.as_str()))
@@ -254,10 +252,6 @@ impl Db {
.stmt
.bind((":e", json.as_str()))
.map_err(|e| DbError::bind(&insert.sql, e))?;
insert
.stmt
.bind((":s", status))
.map_err(|e| DbError::bind(&insert.sql, e))?;
match insert.stmt.next() {
Ok(_) => (),
Err(e) => return Err(DbError::push_event(&insert.sql, e)),