daniel_uc
daniel_uc
DTDrizzle Team
Created by daniel_uc on 1/26/2024 in #help
Is this error in Docs for drizzle-kit Running Migrations SQLite
In the following link: https://orm.drizzle.team/kit-docs/overview, it states at the end of the code block for Running Migrations SQLite to write "betterSqlite.close()". However, it closes the database. The code block works when you omit "betterSqlite.close()". According to chatgpt: It appears that the better-sqlite3 package automatically closes the database connection when it is garbage collected or when the Node.js process exits. Therefore, explicitly calling betterSqlite.close() is not necessary in most cases. Is this an error in the docs or is there a reason for inserting "betterSqlite.close()"? If there is a reason for inserting "betterSqlite.close()" how can we mitigate it closing the database when we run our code. Thanks!
7 replies