Special key to ignore all migrations inside an app.
See original GitHub issueIt would be useful to have special key for ignoring all migrations inside an app.
Consider case when we have some third party apps and want to ignore all migrations or for all third party apps at all.
Right now we should do something like this:
DTM_IGNORED_MIGRATIONS = [
('taggit', '0002_auto_20150616_2121'),
('two_factor', '0002_auto_20150110_0810'),
('two_factor', '0003_auto_20150817_1733'),
('two_factor', '0004_auto_20160205_1827'),
('two_factor', '0005_auto_20160224_0450'),
('waffle', '0002_auto_20161201_0958'),
]
With the special key, for example, it’ll get much better:
THIRD_PARTY_APPS = (
'taggit',
'two_factor',
'waffle',
)
# Apps specific for this project go here.
LOCAL_APPS = (
'app_1',
'app_2',
)
INSTALLED_APPS = THIRD_PARTY_APPS + LOCAL_APPS
DTM_IGNORED_MIGRATIONS = [
(app, '*') for app in THIRD_PARTY_APPS
]
Issue Analytics
- State:
- Created 3 years ago
- Reactions:2
- Comments:5 (4 by maintainers)
Top Results From Across the Web
Ignore all current migrations and start from current model state ...
I'm assuming you want to "start fresh" when creating database in PostgreSQL, but still be able to use (or even update) your migrations...
Read more >Django Tips #12 Disabling Migrations to Speed Up Unit Tests
One option is using the MIGRATION_MODULES setting, which is intended to define a custom name for an app's migration module. If you set...
Read more >Migrations - Django documentation
Migrations ¶. Migrations are Django's way of propagating changes you make to your models (adding a field, deleting a model, etc.) into your...
Read more >How to Use Django Migrations - Nick McCullum
You can skip to a specific section of this Django migrations tutorial using ... Django makes migrations for any changes done to the...
Read more >EF Core tools reference (Package Manager Console)
NET Core CLI tools are cross-platform and run inside a command prompt. ... special case that means before the first migration and causes...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I’ll try on next weekend.
Yes! Great idea!
@timur-orudzhov are you willing to submit a fix?