funmaker / Hybooru

Hydrus-based booru-styled imageboard in React
https://booru.funmaker.moe/
MIT License
100 stars 17 forks source link

Hydrus stores timestamps as milliseconds #40

Closed kylebavis closed 8 months ago

kylebavis commented 8 months ago

the Hydrus release last week changed the handling of timestamps, breaking DB import. I get this error:

Unable to initialize DB! SqliteError: no such column: current_files.timestamp at Database.prepare (/app/node_modules/better-sqlite3/lib/methods/wrappers.js:5:21) at i.<anonymous> (/build/server/helpers/dbImport/import.ts:61:31) at Generator.next (<anonymous>) at o (/app/server.js:229:1105) at processTicksAndRejections (node:internal/process/task_queues:95:5) { code: 'SQLITE_ERROR' }

I’m pretty sure the issue is here:

https://github.com/funmaker/Hybooru/blob/6ed6b1740aebc95c537b5728d2cfd46516ba7bce/server/helpers/dbImport/posts.ts#L33

The timestamp column is named timestamp_ms now, and presumably is millisecond-precision.

funmaker commented 8 months ago

Fixes as of v1.11.0