The current project has around 620 django models, which takes around 1 hour to migrate. . (uses only 12.x% of 8 core intel skylake with 1.2gigs of 30gigs ram on gcloud while migration) this metrics is combined for pg and python 2 (cpython). I assume that only a single core is used while migrating. [celery processes uses 100% CPU + 50% of ram. ]
each migration is like,
class Migration(migrations.Migration):
initial = True
dependencies = [
('dist', '0001_initial'),
]
operations = [
migrations.CreateModel(
name='model name',
fields=[
...
...
60 fields
...
...
],
options={
'abstract': False,
},
),
]
they are identical but with some minor changes to fields.
Is there any way to migrate this database faster? can I run migrations on parallel? since migrations after 30 (internal apps and dists) are not related to each other, can I run these migrations in parallel?
thank you