funmaker / Hybooru

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

Error in DB initialization in Windows #1

Closed yescine closed 3 years ago

yescine commented 3 years ago

in ver1.3 the path for DB is not found and if I try to make the .db file I got this error (Sorry I' am from MongoDB background )

Unable to initialize DB! SqliteError: no such table: current_files at Database.prepare (C:\Users\bouch\Desktop\HPDesktop\PositionHybooru\node_modules\better-sqlite3\lib\methods\wrappers.js:5:21) at Posts.total (C:\Users\bouch\Desktop\HPDesktop\PositionHybooru\server\helpers\dbImport\index.ts:19:24) at Posts. (C:\Users\bouch\Desktop\HPDesktop\PositionHybooru\server\helpers\dbImport\index.ts:37:30) at Generator.next () at C:\Users\bouch\Desktop\HPDesktop\PositionHybooru\build\server.js:5222:67 at new Promise () at __webpack_modules../server/helpers/dbImport/index.ts.awaiter (C:\Users\bouch\Desktop\HPDesktop\PositionHybooru\build\server.js:5201:10) at Posts.start (C:\Users\bouch\Desktop\HPDesktop\PositionHybooru\build\server.js:5282:12) at C:\Users\bouch\Desktop\HPDesktop\PositionHybooru\server\helpers\db.ts:97:50 at Generator.next ()

funmaker commented 3 years ago

You are not supposed to create any .db file. The .db files are supplied by Hydrus, it is the Hydrus database(SQLite). You can configure location of this database using "hydrusDbPath" field in configs.json, or set it to null to use the default location. (%appdata%/hydrus/db(Windows), ~/.local/share/hydrus/db(Linux), ~/Library/Preferences/hydrus/db(MacOS), check these locations if you can find Hydrus database files)

Once you do that, this error should be resolved. Remember to also setup an empty PostgreSQL database. This is the database that Hybooru will use. It actually copies relevant metadata from Hydrus database into its own database(PostgreSQL) to run independently. from Hydrus.

yescine commented 3 years ago

Thank you for highlighting the fact it suppose to have external DB, I thought that Hybooru is the full tagging application.

it would be nice to if we can manage tags from Hybooru app.