Ad

django-test-migrations: Test Django schema and data migrations

django-test-migrations allows testing Django migrations, including forward, backward, and order verification. Ensures data integrity and migration dependencies.
Screenshot of wemake-services/django-test-migrations homepage

django-test-migrations allows testing Django schema and data migrations. It provides tools to verify migrations' order, names, and data integrity, crucial for ensuring data consistency during complex database changes. This tool is designed to isolate and test migration logic, allowing for proactive identification of potential issues before deployment. It leverages a flexible approach enabling testing both forward and backward migrations with granular control over the database state.

The library offers precise control over migration execution, supporting both forward and backward tests. It includes a robust plan generation feature to validate migration order, crucial for complex projects with dependencies. Integration with pytest and unittest provides seamless testing within existing testing workflows. The library is fully typed, promoting code reliability and maintainability.

  • Migration Testing: Verify the outcome of individual migrations and migration sequences.
  • Forward and Backward Tests: Supports testing both forward and rollback migrations.
  • Migration Ordering: Ensures migrations are applied in the correct sequence.
  • pytest & unittest Integration: Provides fixtures and test cases for popular testing frameworks.
  • Factory Support: Simplifies testing by seamlessly integrating with factory-based testing.
  • Dependency Validation: Checks migration dependencies for proper execution order.
  • Type Safety: Fully typed with mypy for improved code reliability.

The project is actively developed and maintained, with recent commits and a clear track record of stability. The documentation is comprehensive, and the active issue tracker indicates ongoing development and community engagement. The presence of established test cases and examples shows a commitment to quality and usability.

This project benefits Django developers who need to ensure the integrity of database migrations, especially during schema changes or when rolling back changes. It streamlines the testing process for migration logic, offering a reliable method for verifying migration order, data consistency, and dependency relationships. It is particularly valuable in projects with complex database structures or when using frequent schema updates.

Summarize:
Share:
Stars
572
Forks
34
Issues
15
Created
6 years ago
Commit
2 months ago
License
MIT
Archived
No
Updated 1 month ago

Similar Repositories