-
Notifications
You must be signed in to change notification settings - Fork 61
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Pgdiff can't compare not public database schemas #18
Comments
Rick, I'm really sorry I haven't gotten to this yet. I'll do my best to get it done this weekend. Bug me on Monday if you don't see any changes. Knowing you'll do that should help me get it done this weekend. :-) |
Thank you. It's very pleasant that you react so quickly to this problem. |
Rick, Would you be OK if you were able to compare one schema at a time? I'm thinking about having the user specify a schema for each database, so someone could compare two schemas with different names. But I suspect that most of the time the schema names will be the same. I may be able to have you specify a star for the schema so it will compare all non-postgres schemas in one shot. |
That's a good question, Jon. My case is the one when in both bases the compared schemes with the same names. However, from the point of view of the architecture of the application, it is more correct if you can specify schema names for both databases. And maybe in some cases, they will sometimes be different. |
Hello, Jon! When will the new release ? |
It depends on how much I get done this weekend. Sorry I can't tell you more than that. |
Rick, Doh! And good news. I just realized that I created a branch 0.9.3 that compares all schemas in the database except the system schemas. But I never merged that branch into master because I was wanting more feedback. Could you test the binaries in this branch and let me know if that will work for you? https://github.com/joncrlsn/pgdiff/tree/release/0.9.3 This won't allow you to compare two schemas unless they have the same name, so this doesn't do everything we discussed, but I think it will do what you need right now. Please let me know how it works for you. Thanks! |
Thanks Jon for release! But I can not test branch 0.9.3 . I use Windows, but binary in folder bin-win is old. It's not contained last chandes. I tried to compile the executable for windows with the help of the compiler Go but there were errors. Could you recompile all binaries with last changes in sources? |
Hi Rick, Try this. I can't promise it will work completely because I don't have a full database to test things with anymore. I'm remedying that with scripts that create small databases to test individual portions of a schema in a more controlled way. Anyway, use -S '*' and -s '*' to compare all schemas except the postgres ones. https://github.com/joncrlsn/pgdiff/files/1409302/pgdiff-0.9.3-beta.2-windows.zip Best wishes. Let me know if you get an error you don't understand. |
Thank you Jon for windows binary file. I tested it and found problems. There are my remarks about problems in pgdiff:
Example BEGIN ..... In our database some columns has name 'limit' . It name matches the SQL language keyword. For this reason alter table "crosses"."links_logs" add column "limit" varchar(10); will not have problems. I launched your application for get difference between functions not only public schema. But application Thank you for attention |
OK, I hadn't heard of double-quotes working. I've only seen single-quotes in SQL, so I'll try both. I'm making my way through the db types on the 0.9.3 branch and making them work either for all non-public or for comparing two different schemas. It's slower than I had hoped it would be given that it needs some different code when comparing between schemas. I'll check the functions code. It's possible I missed that. |
Hello Jon, ./pgdiff -U mds -W mds -H yyy.xxx.com -P 5432 -D val1 -O 'sslmode=disable' -S "test" There is something wrong ? I am using 0.9.3 version Thanks ! |
That should work. Are you compiling it from the source? If not, try the beta release code here: https://github.com/joncrlsn/pgdiff/releases The links in the main README are pointing to old binaries... I'm working to fix that. |
@Rickkk The code to specify schemas to compare is done so I created a 1.0 beta 1 release for that and updated the download links in the README on the master branch. The work took a lot longer than I thought it would. I also suffixed the function definitions with semi-colons so that is done too. I will work next on quoting the table and column names while I wait for more feedback. Let me know how it goes for you. Thanks! |
Hi! In our database 10 different database schemas with many objects. I would like to transfer changes in this schemas to database recipient, but pgdiff create scipt with only objects in public schema. How can I solve this problem?
The text was updated successfully, but these errors were encountered: