A Django admin command to recreate all migrations in a project.
Project description
Django remake migrations
Documentation: https://django-remake-migrations.readthedocs.io
Source Code: https://github.com/browniebroke/django-remake-migrations
A Django admin command to recreate all migrations in a project. Like a squashmigrations
command on steroids.
The problem
The built-in squashmigrations
command is great, but it only work on a single app at a time, which means that you need to run it for each app in your project. On a project with enough cross-apps dependencies, it can be tricky to run.
This command aims at solving this problem, by recreating all the migration files in the whole project, from scratch, and mark them as applied by using the replaces
attribute.
It makes an important trade-off though: it does NOT try to be correct when setting the replaces
attribute. The only guarantees are that:
- all old migrations are marked as replaced once.
- all new migrations replace at least one of the old migrations
This is OK to make this trade-off as long as all your environments are fully migrated when you deploy the remade migrations.
Contributors ✨
Thanks goes to these wonderful people (emoji key):
Bruno Alla 💻 🤔 📖 |
Dmytro Litvinov 📖 |
Mikuláš Poul 💻 🤔 |
Adam Johnson 🐛 |
This project follows the all-contributors specification. Contributions of any kind welcome!
Credits
This package was created with Copier and the browniebroke/pypackage-template project template.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file django_remake_migrations-2.7.0.tar.gz
.
File metadata
- Download URL: django_remake_migrations-2.7.0.tar.gz
- Upload date:
- Size: 14.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 |
2f6f9079b2e298c99dd00a3820407de390c1e5b5df3fce037df91e324fa7f3f7
|
|
MD5 |
fe195b22ecf6fd8c11a04bc9df8b7942
|
|
BLAKE2b-256 |
f52fcdd9c29f8ea6540875bdea67ffbcda5df862f4d53867ad0750402f1ee3a0
|
Provenance
The following attestation bundles were made for django_remake_migrations-2.7.0.tar.gz
:
Publisher:
ci.yml
on browniebroke/django-remake-migrations
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1
-
Predicate type:
https://docs.pypi.org/attestations/publish/v1
-
Subject name:
django_remake_migrations-2.7.0.tar.gz
-
Subject digest:
2f6f9079b2e298c99dd00a3820407de390c1e5b5df3fce037df91e324fa7f3f7
- Sigstore transparency entry: 189724365
- Sigstore integration time:
-
Permalink:
browniebroke/django-remake-migrations@756bd1d5b5bf496a897fc44c443d0511c55dc5dd
-
Branch / Tag:
refs/heads/main
- Owner: https://github.com/browniebroke
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com
-
Runner Environment:
github-hosted
-
Publication workflow:
ci.yml@756bd1d5b5bf496a897fc44c443d0511c55dc5dd
-
Trigger Event:
push
-
Statement type:
File details
Details for the file django_remake_migrations-2.7.0-py3-none-any.whl
.
File metadata
- Download URL: django_remake_migrations-2.7.0-py3-none-any.whl
- Upload date:
- Size: 10.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 |
644154692ff841877cac960eab33d2ba80e00bb232e49c21f0900a94d1d9c698
|
|
MD5 |
d7973ec9330fa2b0387ef25041762658
|
|
BLAKE2b-256 |
c543e1e21ee2167b660fdc9f0aa8c8b6b4bdcf54237481712fc77f76ba595226
|
Provenance
The following attestation bundles were made for django_remake_migrations-2.7.0-py3-none-any.whl
:
Publisher:
ci.yml
on browniebroke/django-remake-migrations
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1
-
Predicate type:
https://docs.pypi.org/attestations/publish/v1
-
Subject name:
django_remake_migrations-2.7.0-py3-none-any.whl
-
Subject digest:
644154692ff841877cac960eab33d2ba80e00bb232e49c21f0900a94d1d9c698
- Sigstore transparency entry: 189724369
- Sigstore integration time:
-
Permalink:
browniebroke/django-remake-migrations@756bd1d5b5bf496a897fc44c443d0511c55dc5dd
-
Branch / Tag:
refs/heads/main
- Owner: https://github.com/browniebroke
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com
-
Runner Environment:
github-hosted
-
Publication workflow:
ci.yml@756bd1d5b5bf496a897fc44c443d0511c55dc5dd
-
Trigger Event:
push
-
Statement type: