karenc / db-migrator

GNU Affero General Public License v3.0
4 stars 5 forks source link

Allow setting the configuration key value from the CLI #5

Closed mmulich closed 6 years ago

mmulich commented 8 years ago

Can we get a command-line option that allows one to set the name of the configuration option? Something like --config-ini-section app:main --config-ini-key postgresql.db-connection-string. Or maybe we should just change the configuration. :sweat_smile:

As it stands (using cnx-authoring), we end up with: Exception: db-connection-string missing When in reality the connection string is there, just not where it's supposed to be. :stuck_out_tongue:

karenc commented 8 years ago

I think we don't need to include the config ini section since the code look for the setting in every section. :stuck_out_tongue:

The problem is db-connection-string is not the only configuration that can be read from the config ini file. So it'd have to look a bit different... like --config-ini-key='db-connection-string:postgresql.db-connection-string? ... :confused:

Hm... >.< Changing the configuration is also kind of annoying... Given we only use postgresql in cnx-authoring, maybe it's ok.