django-migrations Questions
3
Solved
I have a Django model that used to look like this:
class Car(models.Model):
manufacturer_id = models.IntegerField()
There is another model called Manufacturer that the id field refers to. However...
Lurcher asked 25/3, 2021 at 16:3
8
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/Users/p.gauthamprasad/Downloads/pb/pbapp/manage.py", line 22, in <module...
Vicinage asked 27/10, 2022 at 5:39
5
Solved
I want my application to have default data such as user types.
What's the most efficient way to manage default data after migrations?
It needs to handle situations such as, after I add a new table,...
Johannajohannah asked 28/9, 2016 at 6:21
7
Solved
I just upgraded my django from 1.7.1 to 1.8.4. I tried to run python manage.py migrate but I got this error:
django.db.utils.ProgrammingError: relation "django_content_type" does not exist
I drop...
Exurb asked 17/9, 2015 at 0:45
5
Solved
Interesting:
./manage.py makemigrations apps.myapp -> "App 'apps.myapp' could
not be found. Is it in INSTALLED_APPS?"
./manage.py makemigrations myapp -> Works.
./manage.py makemigrations...
Grecian asked 24/9, 2016 at 17:54
10
Solved
I just started learning django, and as i try to apply my migrations the first problem occurs. I start the server up, type
python manage.py migrate
and nothing happens. No error, no crash, just ...
Radborne asked 1/5, 2017 at 11:41
1
Solved
I am managing a django app built by third parts.
I have configured in settings.py the connection to a new db
'default': { # changed
'ENGINE': 'django.contrib.gis.db.backends.postgis',
'NAME': 'wa...
Isomer asked 19/5, 2024 at 17:2
4
Solved
Django documentation says we could delete migrations after squashing them:
You should commit this migration but leave the old ones in place; the
new migration will be used for new installs. Onc...
Expose asked 4/6, 2015 at 0:22
5
With Django 1.11.22 I'm trying to run migrations
python manage.py migrate
django.db.migrations.exceptions.InconsistentMigrationHistory: Migration base.0036_auto_20190227_1226 is applied before its...
Etymologize asked 14/7, 2019 at 11:8
18
Solved
There are two models Groups and Students and only one table for Groups of them, the Students table was deleted.
How to make Django recreate the deleted table? If I do makemigrations it prints "...
Velutinous asked 21/10, 2015 at 12:35
41
Solved
I was trying to create migrations within an existing app using the makemigrations command but it outputs "No changes detected".
Usually I create new apps using the startapp command but di...
Proteinase asked 22/3, 2016 at 11:55
9
Solved
I have two applications (ook and eek say) and I want to use a foreign key to a model in ook from a model in eek. Both are in INSTALLED_APPS with ook first.
In ook.models.py, i have:
class Fubar(m...
Dismissal asked 3/11, 2015 at 10:8
6
Solved
I'm writing an app in django 1.8 with python 3.4 and I'm encountering an issue with using MySQL as the database backend which has got me completely stumped.
When I start off with a new database an...
Calorie asked 14/9, 2015 at 20:44
15
I've made a migration that added a new table and want to revert it and delete the migration, without creating a new migration.
How do I do it? Is there a command to revert last migration and then ...
Unblushing asked 20/8, 2015 at 16:24
19
Solved
I run python manage.py makemigrations and I get:
No changes detected
Then, python manage.py migrate and I get:
No migrations to apply.
Then, I try to push the changes to production:
git push he...
Schedule asked 5/3, 2017 at 20:25
18
Solved
When I run tests I get this error during database initialization:
django.db.migrations.state.InvalidBasesError: Cannot resolve bases for [<ModelState: 'users.GroupProxy'>]
This can happen if...
Tented asked 15/5, 2015 at 19:21
14
Solved
(I know there is a title the same as this, but the question is different).
I have managed to get my development machine migrations and production migrations out of sync.
I have a Django app whi...
Simper asked 25/3, 2015 at 10:42
8
Solved
I have read a lot of other posts here on stackoverflow and google but I could not find a solution.
It all started when I changed the model from a CharField to a ForeignKey.
The error I recieve is...
Xylograph asked 15/5, 2016 at 18:3
7
Solved
I am trying to interact with the development server for my django project. However any page on the server returns the same error:
Exception Type: ProgrammingError
Exception Value: column myApp_ve...
Ransack asked 29/6, 2015 at 15:7
12
I am following these two references (one and two) to have a custom user model in order to authenticate via email and also to add an extra field to it.
class User(AbstractBaseUser, PermissionsMixin...
Row asked 14/3, 2017 at 18:50
30
yekabathula-macbookair2:roster yekabathula$ python manage.py migrate
Operations to perform:
Synchronize unmigrated apps: staticfiles, messages
Apply all migrations: admin, contenttypes, api, auth...
Weisburgh asked 12/10, 2015 at 16:57
3
Solved
Using django 1.8 + Postgres 9+, I have models with custom PG datatypes (like ltree). Creating de database from zero fail because
CREATE EXTENSION ltree;
is not executed. I try with a empty migr...
Brigittebriley asked 16/9, 2015 at 21:29
10
Solved
I want to remove null=True from a TextField:
- footer=models.TextField(null=True, blank=True)
+ footer=models.TextField(blank=True, default='')
I created a schema migration:
manage.py schemamig...
Subset asked 11/10, 2012 at 11:6
6
Solved
I got the following error after adding a new model field and running the makemigrations command:
ImportError: cannot import name 'FieldDoesNotExist' from 'django.db.models' (/usr/local/lib/python3....
Foulness asked 7/8, 2020 at 10:57
5
Solved
I am using django 1.7 and I just added a custom user model. When I run either python3 manage.py makemigrations or python3 manage.py migrate I get the error: TypeError: __init__() got an unexpected ...
Extramundane asked 17/10, 2014 at 19:36
1 Next >
© 2022 - 2025 — McMap. All rights reserved.