What is Database changes tool window
Answered
2018.1 is finally coming, I saw the "Database Changes" in tool windows. Does anyone know how to use it?
Please sign in to leave a comment.
Hello. When you edit the source code of any DB object, IDE tracks your changes, highlights the modified rows in the left editor panel. If there are lots of changes in many places, you can see all of them in the Database Changes tool window. Please see for more information related blog post.
thank you for the answer. I hv also read that blog, but I can't find the source code of any object mentioned in it.
IDE tracks changes only for DB objects which have actual source code, that is stored in database, e.g. triggers, procedures/functions, views:
Ok, I got it , Thank you very much.
This would be extremely useful, but unfortunately, with PostgreSQL at least, it doesn't pick up the schema name. I raised a bug DBE-6135 - looks as though it's been closed. Advice is to always use SQL generator, which does pick up the schema name since it's subject to options. It would be so useful to be able to use this feature as designed, with compare to the source database, synchronise etc., but if you try to use it as intended you end up with duplicate objects in the public schema.
Finally, if you were able to develop something which provided a way of tracking DDL changes with commits, you'd have something unique! Obviously it's really complicated because the database can change independently, but if you were to treat it as a remote repo you might be able to re-use existing mechanisms for that. As it is I use pg_dump to generate a DDL file after big chunks of work and commit the changes to it to git. It's an ugly workaround to a problem that remains pretty much unsolved out there.