How to use a database data model with microservices?

There is a large database. We plan on writing several microservices to work with it. Each micro service will work through ORM. It is clear that using the ORM at micro service should be the database data model.

Question. What if you want to make changes to the database. After all, if we change the schema, then the schema change will affect the rest of the n services. Which will need to be rebuild with new DB schema and test each that nothing fell off.

And if you do not have a General database schema, it becomes even more difficult.

To the question why microservices. To in error all at once didn't fall and it was possible to fix a broken component, scoring on everything else.
June 7th 19 at 15:00
2 answers
June 7th 19 at 15:02
Solution
Good for every micro service needs to work with your database.
And so, to break the microservices to change the DB schema did not lead to changes in all microsauria.
Well, write tests, tests and more tests.
Not to look where the tables are used, and run the tests and see where that fell
And the microservices to communicate with each other only via the API? Type "give me the list of users"? - paula.Ste commented on June 7th 19 at 15:05
As would be Yes.
This type of trick microsauria.
But again, all depends on specific tasks. - Jerry.Dickinson commented on June 7th 19 at 15:08
June 7th 19 at 15:04
For example, to work directly with the DB and through the API. Or just score microservices, because they have to be independent, but not like you.

Find more questions by tags PythonDatabasesService-oriented architectureSQLAlchemy