BitByte-TPC / gymkhana

Official gymkhana web application
9 stars 21 forks source link

[API] Add an sh script to generate migrations in correct order #123

Closed Samy-33 closed 2 years ago

Samy-33 commented 2 years ago

In multi-app and multi-model django application, migrations are a way to keep track of db schema changes.

And our apps are dependent on each other and ideally should form a Directed Acyclic Graph of dependencies between them.

Everytime the develop needs to run makemigrations (be it first time setup or docker container setup), they should not have to worry about the order in which they have to makemigrate the apps.

A bash script that has this order defined will help the developers to skip this highly confusing step to build the app.

arminpatel commented 2 years ago

I'm working on this.

arminpatel commented 2 years ago

Order for migrations: api_accounts, api_auth, api_clubs. Looks right?

Samy-33 commented 2 years ago

Order for migrations: api_accounts, api_auth, api_clubs. Looks right?

Yup, and in the end, do a overall makemigrations without any app.