|
We use a database-first approach, designing our schema in pgModeler and applying the generated diff to keep the database in sync with the model. We've run into a problem after introducing Hangfire, which automatically provisions its own tables under a dedicated hangfire schema at runtime. This works as expected, but since these tables aren't part of our pgModeler model, the diff operation flags them for deletion and attempts to drop them. Is there a way to exclude entire schemas (such as hangfire) from diff operations? We would like to configure this as a persistent default (stored in the project file) if possible, so that the exclusion is applied automatically on every diff and can't be accidentally forgotten by a team member. |
Replies: 1 comment 3 replies
|
Hi @jokay Yes, you have some options...
In the image, I'm excluding any object under |

Hi @jokay
Yes, you have some options...
In the diff dialog, check the option "Do not drop missing objects", but if you remove an object from your model, that exclusion will not be detected.
Import the Hangfire tables and other objects to your database model. In the import dialog, check the option "Import object to model" and choose the model you want the objects to be created in. In the objects tree, select only those owned by Hangfire. Once imported, disable their SQL code (if not already disabled).
Use the partial diff tool if you don't want to run option 2. In that case, it's a bit more complicated because it involves regular expressions:
In the image, I'm excluding any object…