Comments (8)
i'm getting
python manage.py migrate
CommandError: Conflicting migrations detected; multiple leaf nodes in the migration graph: (0006_partial, 0004_auto_20160423_0400 in social_django).
To fix them run 'python manage.py makemigrations --merge'
(test) ubuntu@ubuntu-xenial:~/test$ python manage.py makemigrations --merge
No conflicts detected to merge.
(test) ubuntu@ubuntu-xenial:~/test$ python manage.py makemigrations social_django --merge
No conflicts detected to merge.
...
from social-app-django.
hi
i have the same problem with migration
C:\Users\Developer\PycharmProjects\lvov-landing>python manage.py migrate
Operations to perform:
Synchronize unmigrated apps: djangocms_flash, plantour, djangocms_file, rest_framework, djangocms_inherit, djangocms_video, ckeditor_uploader, djangocms_column, djangocms_googlemap, modeltranslation
, social_auth, djangocms_admin_style, sitemaps, corsheaders, djangocms_picture, sekizai, adminsortable2, djangocms_style, treebeard, thumbnail, djangocms_teaser
Apply all migrations: menus, reversion, contacts, admin, djangocms_link, sessions, question, sertificat, auth, sites, reviews, food, contenttypes, tours, whywe, surprise, hotels, cms, gallery, djang
ocms_text_ckeditor
Synchronizing apps without migrations:
Creating tables...
Installing custom SQL...
Installing indexes...
Running migrations:
Applying tours.0015_delete_maintoursmenu...Traceback (most recent call last):
File "manage.py", line 10, in
execute_from_command_line(sys.argv)
File "C:\Users\Developer\PycharmProjects\virtal-env\lvov\lib\site-packages\django\core\management_init_.py", line 385, in execute_from_command_line
utility.execute()
File "C:\Users\Developer\PycharmProjects\virtal-env\lvov\lib\site-packages\django\core\management_init_.py", line 377, in execute
self.fetch_command(subcommand).run_from_argv(self.argv)
File "C:\Users\Developer\PycharmProjects\virtal-env\lvov\lib\site-packages\django\core\management\base.py", line 288, in run_from_argv
self.execute(*args, **options.dict)
File "C:\Users\Developer\PycharmProjects\virtal-env\lvov\lib\site-packages\django\core\management\base.py", line 338, in execute
output = self.handle(*args, **options)
File "C:\Users\Developer\PycharmProjects\virtal-env\lvov\lib\site-packages\django\core\management\commands\migrate.py", line 161, in handle
executor.migrate(targets, plan, fake=options.get("fake", False))
File "C:\Users\Developer\PycharmProjects\virtal-env\lvov\lib\site-packages\django\db\migrations\executor.py", line 68, in migrate
self.apply_migration(migration, fake=fake)
File "C:\Users\Developer\PycharmProjects\virtal-env\lvov\lib\site-packages\django\db\migrations\executor.py", line 96, in apply_migration
if self.detect_soft_applied(migration):
File "C:\Users\Developer\PycharmProjects\virtal-env\lvov\lib\site-packages\django\db\migrations\executor.py", line 140, in detect_soft_applied
apps = project_state.render()
File "C:\Users\Developer\PycharmProjects\virtal-env\lvov\lib\site-packages\django\db\migrations\state.py", line 75, in render
"for more" % new_unrendered_models
django.db.migrations.state.InvalidBasesError: Cannot resolve bases for [<ModelState: 'djangocms_flash.Flash'>, <ModelState: 'djangocms_file.File'>, <ModelState: 'djangocms_inherit.InheritPagePlacehold
er'>, <ModelState: 'djangocms_video.Video'>, <ModelState: 'djangocms_column.MultiColumns'>, <ModelState: 'djangocms_column.Column'>, <ModelState: 'djangocms_googlemap.GoogleMap'>, <ModelState: 'django
cms_picture.Picture'>, <ModelState: 'djangocms_style.Style'>, <ModelState: 'djangocms_teaser.Teaser'>]
This can happen if you are inheriting models from an app with migrations (e.g. contrib.auth)
in an app with no migrations; see https://docs.djangoproject.com/en/1.7/topics/migrations/#dependencies for more
from social-app-django.
@snj, are the python-social-auth migrations applied? The migrations in social_django
are configured with the replaces
rules to properly tell django to identify the old ones as valid if applied. Check the migrations applied in the DB, also running with --fake
worked for somebody that had the migrations applied.
from social-app-django.
For me, I had the python-social-auth migrations duplicated in django_migrations
under both the "social_auth" app and "default" app (migations 0000 - 0004). In #22, the OP updated the default names, and for me, I just deleted them. These entries in django_migrations
existed from the old python package (python-social-auth==0.3.4).
Perhaps update the docs on migrating from python-social-auth to social-auth-app-django & social-auth-core to mention this problem?
from social-app-django.
The problem seems to be that 0005_auto_20160727_2333 which has been applied previously is not visible now.
This is caused by replaces field in that migration as currently it replaces both migrations from default
and social_auth
. As this migration was never shipped with default
and migration in social_auth
does not replace the default
one, it does not exist for anybody and thus Django does not see it.
Should be fixed by #25
from social-app-django.
Hi,
After upgrade from old pytho-social-auth lib I'm also experiencing this issue:
(...)
django.db.migrations.graph.NodeNotFoundError: Migration social_django.0002_add_related_name dependencies reference nonexistent parent node (u'social_django', u'0001_initial')
New version (1.0.1) does not fix this. I've also have this 0001_initial migrations with app=dafault in db. What is the best way to fix that apart from running SQL statement directly on prod DB? I would prefere to write custom migration - I tried, with use of:
run_before = [
('social_django', '0001_initial'),
]
operations = [
migrations.RunSQL('''
update django_migrations set app='social_django' where app='default';''')
]
but I still get this error. Any idea how to solve this?
from social-app-django.
@cmichal You need to have both social_django
and default
in the database (for all 0001 - 0004, the 0005 never existed with default
app).
It would be fixed by upgrading first to python-social-auth 0.2.21 and then to 0.3.x. I'm not really sure if it's doable to support upgrade from any intermediate state. Obviously there were more issues folded in here and I've fixed just one of them (upgrade from 0.2.20+).
from social-app-django.
I've created #28 for this.
from social-app-django.
Related Issues (20)
- Only perform verification or update existing user
- Missing migrations on 5.2.0? HOT 2
- Django 4.2.2 breaks the way JSONField behaves HOT 1
- Question. Request additional Google Permissions outside of login flow
- SAML redirect loses session data storing "next" url and RelayState cannot be used instead
- Requiring POST method by default HOT 1
- Social Auth with Gmail SSO Causing Error --> 'str' object has no attribute 'get' HOT 2
- 5.2.0 not compatible with Django >= 4.2.2
- How to override a field of `AbstractUserSocialAuth` HOT 1
- IrreversibleError when migrating app zero for a new DB HOT 1
- Subclassing AbstractUserSocialAuth creates migration in social_django app. HOT 1
- 5.3.0 migrations feedback HOT 9
- Deprecated Sign In with LinkedIn HOT 2
- Enhance Django OAuth Library for Clean JSON Responses in API Development
- Linkedin complete login step is stuck
- AWS Cognito - Invalid scope error on authentication request HOT 1
- Update to social-core 4.5.2 HOT 1
- OPEN FOR MAINTAINERS
- Problem with facebook when email is added to scope, redirect url is not correct
- Accidental incompatible behavior change in version 5.4.1 HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from social-app-django.