deleting a listing now sets it to deleted in the db, preventing it from reappearing when scraping happens

This commit is contained in:
orangecoding
2026-01-26 12:07:21 +01:00
parent 9e5989ece3
commit 72fffc526b
2 changed files with 35 additions and 9 deletions

View File

@@ -0,0 +1,16 @@
/*
* Copyright (c) 2026 by Christian Kellner.
* Licensed under Apache-2.0 with Commons Clause and Attribution/Naming Clause
*/
export function up(db) {
// 1. Add manually_deleted column
db.exec(`ALTER TABLE listings ADD COLUMN manually_deleted INTEGER NOT NULL DEFAULT 0;`);
// 2. Remove change_set column
try {
db.exec(`ALTER TABLE listings DROP COLUMN change_set;`);
} catch {
// if column does not exists for whatever reason
}
}