michaelsogos / pg-diff

PostgreSQL schema and data comparing tool
MIT License
171 stars 17 forks source link

Feature request: generate config file #14

Open ndastur opened 4 years ago

ndastur commented 4 years ago

It would be really great if there was a command line option to generate a dummy config file. Or better still take 2 connection strings and populate the config file too

michaelsogos commented 4 years ago

Hi @ndastur

Nice idea, can you explain it better?

  1. A command line to generate an CONFIG FILE for EXAMPLE? You can copy and paste the one you can find in documentation. However i can create it "on the fly".
  2. Take a connection string? Do you think to accept command paramenter in order to make a config file with the connection string passed as parameter?

Because the config file has many options is very difficult to make one that fit your needs, if you like i can work on an "interactive" config generator from command line.

ndastur commented 4 years ago

Thanks @michaelsogos.

Just a quick note while I'm here the config file on the documentation site has an error. I think schemaNamespace is now schemaCompare

I guess I was thinking of a template like output. But an interactive config generator would be brilliant. I'm sure that would work better than a template file. Especially as JSON doesn't have support for comments and so all those // comments need to be deleted by hand from any output.

With regards to connection strings. Is there a reason the config file couldn't have connection strings rather than the broken down component parts?

michaelsogos commented 4 years ago

Hi @ndastur ,

Thanks for doc suggestion, you are right!

About your request, we plan it for version 2.x of this tool because we are refactoring the code in order to converge with pg-diff-api.

andistern commented 2 years ago

thanks @ndastur for mentioning to remove the double slashes . Also had to remove the comma (,) between closing bracket (] )and closing brace (}) in two places of the 2.0 Example. still getting type "regrole" does not exist and not having any clue ;-((