Spent hours struggling with #RustLang unit testing with #sqlx

Using the #[sqlx:test] I can get my tests to work with sqlx::query but whenever I use the sqlx::query! macro the compiler can't find the db table.

Yippee.. I seem to have got it working. Thanks to @briankung for encouragement.
It seems this particular development directory got confused in some way that I don't understand.
The same code (+ cargo.toml + db etc) worked in another project.
So I started with a clean git clone, added the code & now it works.
A bit scary that somewhere there is something I can't see that broke sqlx so thoroughly in this one directory.
Still I have learned a lot about #RustLang testing, async & #sqlx which is good
@briankung nope. It worked and then stopped (went through that multiple times).
So I've switched to #Postgesql and it doesn't seem to have the same problem.
Interesting that both Sqlx for #RustLang and #GoLang have similar problems with #sqlite3
@Dave42W SQLite thought: test frameworks often change the working directory as they run (temp dirs, etc) and sqlite databases are a file on disk. Any chance the test code is using relative paths and seeing different database files at different times?
@briandorsey that might be an issue but I'd expect a db not found rather than table not found error.
But it might be related to using workspaces for the first time.
However, it does seem to be a bit too fragile. I don't want to end up with a lot of troubleshooting with potential extra developers and users.
@Dave42W Ah, sorry to hear that. The sqlite detail slipped my mind earlier - we're using it with postgresql at work. Maybe sqlx's support for sqlite is just not there yet.