You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello, thank you for your work on this. I've been using your project very helpfully.
I have one feature request : generate schemas optionally.
I'm using a db user that does not have permission to execute DDL for tortoise-orm and executing shell command configured with the user occurs OperationalError.
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/dapi-venv/bin/tortoise-cli", line 8, in <module>
sys.exit(main())
File "/dapi-venv/lib/python3.9/site-packages/tortoise_cli/cli.py", line 76, in main
cli()
File "/dapi-venv/lib/python3.9/site-packages/click/core.py", line 1130, in __call__
return self.main(*args, **kwargs)
File "/dapi-venv/lib/python3.9/site-packages/click/core.py", line 1055, in main
rv = self.invoke(ctx)
File "/dapi-venv/lib/python3.9/site-packages/click/core.py", line 1654, in invoke
super().invoke(ctx)
File "/dapi-venv/lib/python3.9/site-packages/click/core.py", line 1404, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "/dapi-venv/lib/python3.9/site-packages/click/core.py", line 760, in invoke
return __callback(*args, **kwargs)
File "/dapi-venv/lib/python3.9/site-packages/click/decorators.py", line 26, in new_func
return f(get_current_context(), *args, **kwargs)
File "/dapi-venv/lib/python3.9/site-packages/tortoise_cli/cli.py", line 21, in wrapper
loop.run_until_complete(f(*args, **kwargs))
File "/usr/local/lib/python3.9/asyncio/base_events.py", line 642, in run_until_complete
return future.result()
File "/dapi-venv/lib/python3.9/site-packages/tortoise_cli/cli.py", line 55, in cli
await Tortoise.generate_schemas(safe=True)
File "/dapi-venv/lib/python3.9/site-packages/tortoise/__init__.py", line 662, in generate_schemas
await generate_schema_for_client(connection, safe)
File "/dapi-venv/lib/python3.9/site-packages/tortoise/utils.py", line 31, in generate_schema_for_client
await generator.generate_from_string(schema)
File "/dapi-venv/lib/python3.9/site-packages/tortoise/backends/base/schema_generator.py", line 448, in generate_from_string
await self.client.execute_script(creation_string)
File "/dapi-venv/lib/python3.9/site-packages/tortoise/backends/mysql/client.py", line 52, in translate_exceptions_
raise OperationalError(exc)
tortoise.exceptions.OperationalError: (1142, "CREATE command denied to user 'user_rw'@'10.240.35.55' for table 'city'")
So I think the command will be more useful if it allows to generate schema optionally like below.
Hello, thank you for your work on this. I've been using your project very helpfully.
I have one feature request : generate schemas optionally.
I'm using a db user that does not have permission to execute DDL for tortoise-orm and executing shell command configured with the user occurs OperationalError.
So I think the command will be more useful if it allows to generate schema optionally like below.
generate-schema
paramgenerate-schema
param (generate schemas by default)I'll be appreciated if you consider my request and give me an opportunity to create PR for this.
The text was updated successfully, but these errors were encountered: