volatiletech / sqlboiler

Generate a Go ORM tailored to your database schema.
BSD 3-Clause "New" or "Revised" License
6.68k stars 538 forks source link

Support relative database path for sqlite3 driver #1409

Open muesli opened 1 month ago

muesli commented 1 month ago

What version of SQLBoiler are you using (sqlboiler --version)?

SQLBoiler v4.16.2

What is your database and version (eg. Postgresql 10)

sqlite3

If this happened at generation time what was the full SQLBoiler command you used to generate your models? (if not applicable leave blank)

sqlboiler sqlite3

Further information. What did you do, what did you expect?

I realize the sqlite3 driver's README states to use absolute paths, but this is rather inconvenient to run on multiple systems / for different users. Being able to specify a relative path would be greatly appreciated.

Specifying a relative path to a database file will result in the generated tests failing (no such table). If that's the expected outcome and intended behavior, rejecting relative paths would improve the experience for first time users of sqlboiler.

muesli commented 1 month ago

Related, but not exactly the same issue: #1407.