Database may not be restoring?
See original GitHub issueNot sure if Iām missing something here but:
const inMemoryDb = newDb();
inMemoryDb.public.none(fs.readFileSync('src/graphql/DB/pgMem/migrations/001-initial.sql', 'utf8'));
const backup = inMemoryDb.backup();
export { inMemoryDb, backup };
When I run this at the top of every test, it doesnāt seem like itās resetting the DB to the initial migration because in 001-initial.sql I do not seed any āCraftersā for the Crafter table. No crafters were created in 001-initial.sqlā. My tests create crafters.
But when I run my tests, itās not clearing crafters that were created after each test runs it seems. If I output select * from crafters, it seems to be aggregating them.
beforeEach(() => {
backup.restore();
});
My tests are mainly mocha. A few are test. Right now Iām just talking about the ones using mocha.
Issue Analytics
- State:
- Created 3 years ago
- Comments:6 (2 by maintainers)
Top Results From Across the Web
6 Ways to Fix SQL Server Restore Failed Database in Use
Error: SQL Server restore failed because the database is in use Ā· Way 1. Close existing connections to destination database Ā· Way 2....
Read more >[Error Solved] SQL Database Restore failed, database in use
How to Fix ?can't restore SQL database because it is in use? Problem? Ā· Method 1 ? Close the existing connections to the...
Read more >SQL Server Database Stuck in Restoring State
Another reason your database can be in restoring state is when you backup the tail of the log using the NORECOVERY option as...
Read more >You cannot restore system database backups to a different ...
The backup of the system database on device d:\temp\master.bak cannot be restored because it was created by a different version of the server...
Read more >[Fixed] SQL Database Restore Failed Database Is in Use
When trying to restore SQL database in Microsoft SQL Server Management Studio, you might come across an error message which suggests the SQLĀ ......
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 Free
Top 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

pg-mem is being supported.
Youāve got some nerve saying that @dschinkel .
Iāve answerered most all of your numerous pseudo-issues, even if most of them were unrelated to pg-mem.
⦠Then you started sending me 5 emails per day on my personal address (still mostly unrelated to pg-mem), which were sometimes aggressive (depending on the hour they were sent).
So yes, after spending hours trying to answer you at first (and free of charge !), I began to take āsome timeā to answer.
Iām supporting pg-mem on my free time, so if you want professional support @dschinkel, I would suggest a meaningful donation. I usually charge 300$/hr, and I think I lost at least a day answering your questions and adding the features you asked for. So do the math, and donate, before casually telling that pg-mem is not being supported.
Iām done with this. Especially due to your last reply. Good luck in 2022 š.