Description
Explain in detail the additional functionality you would like to see in stellar-core.
Currently the new-db command wipes the database content (if there was any) and recreates it.
I'd like to have a way to initialize the database but in a safe, idempotent, way.
Explain why this feature is important
In a dynamic environments, such as k8s, it would be very convenient if I could run a command each time a pod starts to ensure database is initialized. Currently the only ways to initialize the database in a safe way are:
- Run the
new-db command manually. The downside of this method is that it require human intervention
- Write some tooling to detect whether new-db is needed and run it if so. The downside of this method is the fact that operators need to write and maintain custom tooling.
Describe the solution you'd like
This could be solved by adding a new flag, for example --init-only, telling the new-db command to skip destructive operations.
Describe alternatives you've considered
I think improvement to the migrate-up command could also help. If the command could be made to install schema if it doesn't exist that would solve the problem.
Description
Explain in detail the additional functionality you would like to see in stellar-core.
Currently the
new-dbcommand wipes the database content (if there was any) and recreates it.I'd like to have a way to initialize the database but in a safe, idempotent, way.
Explain why this feature is important
In a dynamic environments, such as k8s, it would be very convenient if I could run a command each time a pod starts to ensure database is initialized. Currently the only ways to initialize the database in a safe way are:
new-dbcommand manually. The downside of this method is that it require human interventionDescribe the solution you'd like
This could be solved by adding a new flag, for example
--init-only, telling thenew-dbcommand to skip destructive operations.Describe alternatives you've considered
I think improvement to the
migrate-upcommand could also help. If the command could be made to install schema if it doesn't exist that would solve the problem.