citusdata / django-multitenant

Python/Django support for distributed multi-tenant databases like Postgres+Citus
MIT License
708 stars 116 forks source link

Adds guidelines to get model in migration #167

Closed gurkanindibay closed 1 year ago

gurkanindibay commented 1 year ago

Detailed description to the problem that is mentioned in https://github.com/citusdata/django-multitenant/issues/138#issuecomment-1469497358 Added unit tests and documentation to guide the usage of models which are submodel of TenantModel

codecov[bot] commented 1 year ago

Codecov Report

Merging #167 (5cbce3d) into main (8b9af1c) will not change coverage. The diff coverage is 100.00%.

@@            Coverage Diff            @@
##              main      #167   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files           34        36    +2     
  Lines         1080      1111   +31     
=========================================
+ Hits          1080      1111   +31     
Impacted Files Coverage Δ
...migrationsmodel_alter_account_managers_and_more.py 100.00% <100.00%> (ø)
...29_migration_tests_apps_get_model_20230318_0300.py 100.00% <100.00%> (ø)
django_multitenant/tests/models.py 100.00% <100.00%> (ø)

:mega: We’re building smart automated test selection to slash your CI/CD build times. Learn more

gurkanindibay commented 1 year ago

I moved the new docs from a separate page into the usage section.

I also rewrote the migration docs to try to compare "before and after" more clearly. @gurkanindibay I think the PR is good to merge, unless my rewrite contains technical errors! Please double check.

It looks great. The meaning is now more apparent and easier to comprehend Thanks @jonels-msft