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

feat: support skip table by setting managed=False #397

Draft
wants to merge 5 commits into
base: dev
Choose a base branch
from

Conversation

waketzheng
Copy link
Contributor

Close #299

TODO

  • Add unittest
  • Update old_models_describe
  • Handle case that change managed=False to managed=True after several migrations
  • Update changelog after v0.8.1 released
  • Merge commits into one
  • Request review

Description

  1. if getattr(MyModel.Meta, 'managed', True) is False, ignore MyModel in migration file
  2. model describe dict will save to the aerich table with a extra "skip": True key value
  3. when change managed from false to true, generate migration base on the old_models_describe that skip is not True

@waketzheng waketzheng marked this pull request as draft December 22, 2024 17:57
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.

How to skip certain tables when I migrate database tables
1 participant