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

Schemas #38

Closed
DeolTito opened this issue Feb 18, 2022 · 9 comments
Closed

Schemas #38

DeolTito opened this issue Feb 18, 2022 · 9 comments

Comments

@DeolTito
Copy link

Hello,

I've deployed motoradmin on my container and it worked fine. However, I encountered an issue while switching the schemas under it. By default, they have fetched the tables under the public at first and when I tried to change the schema from public to one of my custom one, the tables aren't listed. I've decommissioned the container and started from scratch. During the initial process, I've tried adding the custom schema and fetched the tables. But again,we won't be able to add a new scheme.

Is there any solution for this?

@omohokcoj
Copy link
Member

@DeolTito try to restart motor admin container in order to make the schema change take affect.

@DeolTito
Copy link
Author

@DeolTito try to restart motor admin container in order to make the schema change take affect.

Does that mean, we will have to restart the container all the time if we wish to add a new schema?

As the volume is mapped on to the host machine, I don't think restarting the container would have any affect as it will pull same contents again.

@omohokcoj
Copy link
Member

omohokcoj commented Feb 18, 2022

@DeolTito defined schemas are a part of postgresql DB connection URL - motor admin doesn't reconnect to apply new schemas automatically - you need to restart motor admin server so it connects to the DB with new schemas list.

@DeolTito
Copy link
Author

@DeolTito defined schemas are a part of postgresql DB connection URL - motor admin doesn't reconnect to apply new schemas automatically - you need to restart motor admin server so it connects to the DB with new schemas list.

Can we add multiple schemas at once?

I've tried that most of the tables weren't fetched.

@omohokcoj
Copy link
Member

@DeolTito you can specify all your schemas separated with comma - "schema_one,schema_two"

@DeolTito
Copy link
Author

@DeolTito you can specify all your schemas separated with comma - "schema_one,schema_two"

Yes, I've tried that already but all the tables are fetched from the remote server.

That said, are you talking about restarting the whole server/container for adding the new schema or just a particular service under it?

@omohokcoj
Copy link
Member

omohokcoj commented Feb 18, 2022

@DeolTito the whole container should be restarted - docker restart container_name
You can simply try it on your local dev machine - it should work there.
If you deployed it straight to some containers service then you need to find some way to restart containers there.

@DeolTito
Copy link
Author

@DeolTito the whole container should be restarted - docker restart container_name You can simply try it on your local dev machine - it should work there. If you deployed it straight to some containers service then you need to find some way to restart containers there.

That worked.

Just to confirm, does Motoradmin support only Postgres, Mysql and Microsoft SQL servers?

@omohokcoj
Copy link
Member

@DeolTito yep only mysql/postgres/sqlserver for now

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