News for hackers. Stuff that matters.
Re:Don't use your ORM entities for everything – embrace the SQL by Spivak on Friday March 29, 2024 @12:45PM (#39866158)
> Will you actually need to change between fundamentally different database technologies?

Yes, use sqlite locally for development and run PG in prod. Unit tests can now use the db and finish in milliseconds. You get unit tests that have the power of integration tests and don't have to ever stub out your db. I use Redislite for the same thing.

I'm of the opinion that SQLite is the musl of the SQL world. By deciding that you'll support it first-class you'll avoid the sharp edges of database specific behavior and extension hell and write better more maintainable code.

"Sorry we can't actually put that logic the database, SQLite doesn't support spooky action at a distance."

Re:Don't use your ORM entities for everything – embrace the SQL by fooododododo on Friday March 29, 2024 @05:31PM (#39869235)
Why not run Pg in a container if that's what's in prod?
Re:Don't use your ORM entities for everything – embrace the SQL by Wulfheart on Saturday March 30, 2024 @03:52AM (#39872758)
But then your tests and prod setup would differ.
Re:Don't use your ORM entities for everything – embrace the SQL by Spivak on Saturday March 30, 2024 @01:48PM (#39876966)
Yes and no, we still run the tests against PG but it's done in CI instead of locally.