Skip to content
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

Export tables without roles? #1834

Open
tachoknight opened this issue Dec 6, 2023 · 3 comments
Open

Export tables without roles? #1834

tachoknight opened this issue Dec 6, 2023 · 3 comments

Comments

@tachoknight
Copy link

Hello!

I've been trying to export a database design with a user that has the create table role, but it seems pgModeler when doing its validation is trying to create a role with it, but that is utterly unnecessary and the user does not have that particular role, so it doesn't work (and exporting directly to the database leads to the app crashing).

Is it possible to limit what is being exported to the database to certain object types (e.g. tables, functions, indexes), and not others? I was not able to find any relevant information in the documentation nor in looking through the interface itself. Exporting the model as a sql file and removing those unnecessary parts (create database, create role, etc.) makes it work if I then feed the sql file to another tool, but it'd be really nice to just be able to do everything in PgModeler.

Thanks!

@rkhaotix
Copy link
Member

rkhaotix commented Dec 6, 2023

Hi @tachoknight

I've been trying to export a database design with a user that has the create table role, but it seems pgModeler when doing its validation is trying to create a role with it, but that is utterly unnecessary and the user does not have that particular role,

In that case, disable the SQL code of the role (or any other object) that isn't necessary. You can achieve that by opening the role's editing form and checking "Disable SQL code", then applying.

so it doesn't work (and exporting directly to the database leads to the app crashing).

Are you on macOS? If so, recently, pgModeler started to crash on that OS. I already know the cause and I am already in the process of patching it. The crash happens when pgModeler raises an exception, and due to internal mechanisms of the Qt framework, the exception is leaking and never being caught. The solution is kind of simple but it'll take some time to get concluded. Unfortunately.

@tachoknight
Copy link
Author

In that case, disable the SQL code of the role (or any other object) that isn't necessary. You can achieve that by opening the role's editing form and checking "Disable SQL code", then applying.

Is that done in the "Model Objects" pane, to the right of the Design window?

Are you on macOS? If so, recently, pgModeler started to crash on that OS. I already know the cause and I am already in the process of patching it. The crash happens when pgModeler raises an exception, and due to internal mechanisms of the Qt framework, the exception is leaking and never being caught. The solution is kind of simple but it'll take some time to get concluded. Unfortunately.

Yep, this is 1.10 on macOS with QT 6.6.1

@rkhaotix
Copy link
Member

rkhaotix commented Dec 6, 2023

In that case, disable the SQL code of the role (or any other object) that isn
Is that done in the "Model Objects" pane, to the right of the Design window?

Yes, if you double-click the role from there it'll open the window where that option I've mentioned can be found.

If you right click the role, go to Quick > Disable SQL

Yep, this is 1.10 on macOS with QT 6.6.1

Great. If the crashes bother you too much you can switch to Linux or Windows for now until I fix everything. :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants