Is there a best practice for initializing and managing database schema(and seed data) for containerized backend applications?
I'm currently developing an on-premise application deployed at the customer's server(either Kubernetes cluster or docker-compose environment). After the database container starts, we manually run the Kubernetes job that generates database schema and seeds initial administrator account data. I want to automate the process. Running migration and seeding for every deployment makes me tired.
Here is another problem. After the schema change, I have to migrate the database schema. In this case, we have to check which seeding scripts ran, then execute the scripts which never ran.
Is there any best practice for managing database schema for containerized, on-premise applications? And can it be automated?