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

Restructure of Madmigration implementation Workflow #85

Closed
wants to merge 9 commits into from

Conversation

maestro-1
Copy link
Contributor

  • 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

@Turall Turall self-assigned this May 22, 2022
Copy link
Collaborator

@Turall Turall left a 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'"```

@AliyevH AliyevH closed this Nov 26, 2022
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

Successfully merging this pull request may close these issues.

3 participants