Models sometimes won't be created after sync and close for SQLite3
See original GitHub issueReproduction Steps
- Create two models, don’t think it matters what’s in them, as long as there’s a primary key and at least one other column
- After that, call
await db.link([Model1, Model2])
, thenawait db.sync()
, thenawait db.close()
- If both tables were created successfully, delete one of them then rerun
Expected Behaviour
Both tables should be created successfully.
Actual Behaviour
Sometimes both will be created successfully, but sometimes not all of them will be created.
Let me know if there’s a misunderstanding of how these methods work or if there’s any issues reproducing it. Thanks.
Issue Analytics
- State:
- Created 3 years ago
- Reactions:1
- Comments:5 (5 by maintainers)
Top Results From Across the Web
How can I avoid concurrency problems when using SQLite on ...
Inserts, updates, deletes and reads are generally OK from multiple threads, but Brad's answer is not correct. You have to be careful with...
Read more >SQLite escaping doesn't work · Issue #149 · eveningkid/denodb
Hi, I tried to use denodb for storing html in a SQLite database. ... await db.sync({ drop: true }); await IssueExample.create({body: "no ...
Read more >File Locking And Concurrency In SQLite Version 3
When a process wants to read from a database file, it followed the following sequence of steps: Open the database file and obtain...
Read more >Importing and Exporting (Dump Command) Data in SQLite
Importing data from SQL files. After having used the .dump command inside the sqlite3 prompt to export your SQLite database as an SQL...
Read more >Database — peewee 3.15.4 documentation
Open and close connections. ... Peewee comes with support for SQLite, MySQL and Postgres. ... by default, do not persist after the connection...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Hey Arnaud, sorry about the late response. My internet was out for a few days, just got a replacement modem yesterday. Seems like all tables are created now, after running another minimal example and my web app. I even dropped one of the tables and reran the app and it created it again. I noticed that you upgraded to version 2 of the sqlite library sometime after I posted this issue, maybe that fixed it.
I’ll reopen if it happens again.
Thanks for the update, no worries. See you around 😃