At the moment the migrations CLI allows us to only apply one set of migration scripts, but it has already been created with the purpose of handling multiple different sets of migrations that are independent of each other. The method to do that is to use the draconctl image used by the OSS repo as a base and add more folders with migrations in it. The migrations command will then scan the top level folder and will apply iteratively all the scripts in it. Each set of scripts will be tracked in a different migrations table bearing the name of the folder containing its scripts. Assume the following folder hierarchy:
The migrations command should scan the folder and discover two sets of migrations. Then it will apply both sets, the first set will use the migration table called enrichments and the second table will use the table automagic_deduplicator. The migrations command should be able to give an exact idea to the user about which migrations need to be applied from each set, and allow the user to selectively apply migrations only from one set.
Issue
At the moment the migrations CLI allows us to only apply one set of migration scripts, but it has already been created with the purpose of handling multiple different sets of migrations that are independent of each other. The method to do that is to use the draconctl image used by the OSS repo as a base and add more folders with migrations in it. The migrations command will then scan the top level folder and will apply iteratively all the scripts in it. Each set of scripts will be tracked in a different migrations table bearing the name of the folder containing its scripts. Assume the following folder hierarchy:
The migrations command should scan the folder and discover two sets of migrations. Then it will apply both sets, the first set will use the migration table called
enrichments
and the second table will use the tableautomagic_deduplicator
. The migrations command should be able to give an exact idea to the user about which migrations need to be applied from each set, and allow the user to selectively apply migrations only from one set.