Django Migration Linter

:rocket: Detect backward incompatible migrations for your django project

Full Stack Web DevelopmentPythonApache-2.0

Abstract

Django Migration Linter is an open-source Full Stack Web Development project. :rocket: Detect backward incompatible migrations for your django project. It is built using Python, Django, MySQL, PostgreSQL. The complete source code is publicly available on GitHub under the Apache License 2.0, making it a useful reference for students building a Full Stack Web Development mini project or final-year project.

1. Introduction

Detect backward incompatible migrations for your Django project. It will save you time by making sure migrations will not break with a older codebase.

2. Objective

:rocket: Detect backward incompatible migrations for your django project

This project demonstrates how Python, Django, MySQL can be applied to a real-world Full Stack Web Development problem.

4. Technology Stack

PythonDjangoMySQLPostgreSQL

5. System Requirements

General requirements for this technology stack — check the README for exact versions.

  • Python 3.8 or later
  • pip / virtualenv for dependencies
  • VS Code, PyCharm or Jupyter Notebook
  • Git (to clone the repository)

6. Installation & Setup

git clone https://github.com/3YOURMIND/django-migration-linter.git
cd django-migration-linter
pip install django-migration-linter
INSTALLED_APPS = [
    ...,
    "django_migration_linter",
    ...,
]
MIGRATION_LINTER_OPTIONS = {
    ...
}
$ python manage.py lintmigrations

(app_add_not_null_column, 0001_create_table)... OK
(app_add_not_null_column, 0002_add_new_not_null_field)... ERR
        NOT NULL constraint on columns
(app_drop_table, 0001_initial)... OK
(app_drop_table, 0002_delete_a)... ERR
        DROPPING table
(app_ignore_migration, 0001_initial)... OK
(app_ignore_migration, 0002_ignore_migration)... IGNORE
(app_rename_table, 0001_initial)... OK
(app_rename_table, 0002_auto_20190414_1500)... ERR
        RENAMING tables

*** Summary ***
Valid migrations: 4/8
Erroneous migrations: 3/8
Migrations with warnings: 0/8
Ignored migrations: 1/8

Full setup instructions are in the project README.

7. Future Enhancements

Suggested extensions you can add to make this your own project.

  • Add role-based access control
  • Deploy on a VPS or cPanel hosting with a custom domain
  • Add automated tests and a CI pipeline

8. Viva / Review Questions

Common questions examiners ask for projects in this domain.

  1. Explain the frontend, backend and database layers of this application.
  2. How is user authentication and authorisation implemented?
  3. Describe the main database tables / collections and their relationships.
  4. Which REST APIs or routes are exposed and what do they return?
  5. How would you deploy this application to production?

9. Source Code & License

This project is developed by 3YOURMIND and published on GitHub under the Apache License 2.0. Please follow the license terms and credit the original author when you use or modify this code.

Want to build this as your internship project?

Work on a Full Stack Web Development project like this with mentor guidance, weekly reviews and an internship certificate from Training Trains, Erode — online or offline.

Apply for Full Stack Web Development Internship