-
Notifications
You must be signed in to change notification settings - Fork 5
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
Restructure of Madmigration implementation Workflow #85
Conversation
maestro-1
commented
Apr 21, 2022
- This PR serves to improve the workflow, allowing for ease of extending support and functionality hence covering Oracle connection #80, achieved by reworking the connection engine and how it interacts with the controller
- Rework the integration with the Migration Controller to allow for flexibility, hence dealing with interaction between different database types postgresql to mongoDB #62 and postgresql -> MongoDB indexing columns #64 . Hence extendible to cover the likes of CassandraDB and redis in future versions. The context manager of the MigrationController class ensures for a graceful exit Handleing Exception #35
- Added connection for async engine via sqlalchemy's new 1.4> version, fix issue async driver support for migration data and create schemas #43
- Removal of sqlalchemy-utils. Incompatible with new versions(async) of sqlalchemy. Uses around the code base is few and limiting. Custom functions written to allow for extending beyond MongoDB and SQL based databases
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @maestro-1 , thank you for your interest in our tool. I didn't test your changes, because I get an error when I run the code NameError: Field name "Config" shadows a BaseModel attribute; use a different field name with "alias='Config'"
. You use in SQLConfigSchema
Config
field which used internally in pydantic
Full trace:
File "/Users/tural/opt/mad-migration/app.py", line 2, in <module>
from madmigration.scripts.commands import cli
File "/Users/tural/opt/mad-migration/madmigration/scripts/commands.py", line 2, in <module>
from madmigration.config.conf import Config
File "/Users/tural/opt/mad-migration/madmigration/config/conf.py", line 6, in <module>
from madmigration.config.config_schema import SQLConfigSchema, NoSQLConfigSchema
File "/Users/tural/opt/mad-migration/madmigration/config/config_schema.py", line 75, in <module>
class SQLConfigSchema(BaseModel):
File "/Users/tural/opt/mad-migration/.venv/lib/python3.9/site-packages/pydantic/main.py", line 244, in __new__
validate_field_name(bases, ann_name)
File "/Users/tural/opt/mad-migration/.venv/lib/python3.9/site-packages/pydantic/utils.py", line 99, in validate_field_name
raise NameError(
NameError: Field name "Config" shadows a BaseModel attribute; use a different field name with "alias='Config'"```