You work from local databases. You keep a migration script that sets up the schema and another migration script that sets up the data. If you create a feature, you must add to each script when merging.
You can run unit tests by creating transactions, running the test, and then rolling back at the end.
I do get your point, though. It's more convenient to be able to mock your database from your code.