Sync reviews
This commit is contained in:
parent
f7e8b13fae
commit
011db51e11
2 changed files with 2 additions and 2 deletions
|
@ -43,7 +43,7 @@ async function loadCollection(inputUsername) {
|
|||
db.prepare("INSERT OR IGNORE INTO account (account, fan_id) VALUES (?, ?)").run(account, fan_id)
|
||||
|
||||
const columns = ["account", "item_id", "item_type", "band_id", "added", "updated", "purchased", "featured_track", "why", "also_collected_count", "item_title", "item_url", "item_art_url", "band_name", "band_url", "featured_track_title", "featured_track_number", "featured_track_duration", "album_id", "album_title", "price", "currency", "label", "label_id"]
|
||||
const upsert_columns = ["added", "updated", "purchased"]
|
||||
const upsert_columns = ["added", "updated", "purchased", "why", "featured_track", "also_collected_count", "featured_track_title", "featured_track_number", "featured_track_duration"]
|
||||
const preparedItem = db.prepare(`INSERT INTO item (${columns.join(", ")}) VALUES (${columns.map(x => "@" + x).join(", ")}) ON CONFLICT DO UPDATE SET ${upsert_columns.map(x => `${x} = @${x}`).join(", ")}`)
|
||||
db.transaction(() => {
|
||||
for (const item of items.items) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue