I have a problem when migrating, cloning project and configuring on my computer but when I perform the first migration so that all the tables grow, I get the error. It is the first migration is a project in which the step dare has several tables but as I comment when making the first migration the error is created
Running migrations:
Applying contenttypes.0001_initial... OK
Applying auth.0001_initial... OK
Applying seguridad.0001_initial... OK
Applying activos.0001_initial...Traceback (most recent call last):
File "manage.py", line 10, in <module>
execute_from_command_line(sys.argv)
File "/Users/gyanezc/Documents/Proyectos/corem-alher/envosx/lib/python2.7/site-packages/django/core/management/__init__.py", line 364, in execute_from_command_line
utility.execute()
File "/Users/gyanezc/Documents/Proyectos/corem-alher/envosx/lib/python2.7/site-packages/django/core/management/__init__.py", line 356, in execute
self.fetch_command(subcommand).run_from_argv(self.argv)
File "/Users/gyanezc/Documents/Proyectos/corem-alher/envosx/lib/python2.7/site-packages/django/core/management/base.py", line 283, in run_from_argv
self.execute(*args, **cmd_options)
File "/Users/gyanezc/Documents/Proyectos/corem-alher/envosx/lib/python2.7/site-packages/django/core/management/base.py", line 330, in execute
output = self.handle(*args, **options)
File "/Users/gyanezc/Documents/Proyectos/corem-alher/envosx/lib/python2.7/site-packages/django/core/management/commands/migrate.py", line 204, in handle
fake_initial=fake_initial,
File "/Users/gyanezc/Documents/Proyectos/corem-alher/envosx/lib/python2.7/site-packages/django/db/migrations/executor.py", line 115, in migrate
state = self._migrate_all_forwards(state, plan, full_plan, fake=fake, fake_initial=fake_initial)
File "/Users/gyanezc/Documents/Proyectos/corem-alher/envosx/lib/python2.7/site-packages/django/db/migrations/executor.py", line 145, in _migrate_all_forwards
state = self.apply_migration(state, migration, fake=fake, fake_initial=fake_initial)
File "/Users/gyanezc/Documents/Proyectos/corem-alher/envosx/lib/python2.7/site-packages/django/db/migrations/executor.py", line 244, in apply_migration
state = migration.apply(state, schema_editor)
File "/Users/gyanezc/Documents/Proyectos/corem-alher/envosx/lib/python2.7/site-packages/django/db/backends/base/schema.py", line 93, in __exit__
self.execute(sql)
File "/Users/gyanezc/Documents/Proyectos/corem-alher/envosx/lib/python2.7/site-packages/django/db/backends/base/schema.py", line 120, in execute
cursor.execute(sql, params)
File "/Users/gyanezc/Documents/Proyectos/corem-alher/envosx/lib/python2.7/site-packages/django/db/backends/utils.py", line 80, in execute
return super(CursorDebugWrapper, self).execute(sql, params)
File "/Users/gyanezc/Documents/Proyectos/corem-alher/envosx/lib/python2.7/site-packages/django/db/backends/utils.py", line 65, in execute
return self.cursor.execute(sql, params)
File "/Users/gyanezc/Documents/Proyectos/corem-alher/envosx/lib/python2.7/site-packages/django/db/utils.py", line 94, in __exit__
six.reraise(dj_exc_type, dj_exc_value, traceback)
File "/Users/gyanezc/Documents/Proyectos/corem-alher/envosx/lib/python2.7/site-packages/django/db/backends/utils.py", line 65, in execute
return self.cursor.execute(sql, params)
File "/Users/gyanezc/Documents/Proyectos/corem-alher/envosx/lib/python2.7/site-packages/django/db/backends/mysql/base.py", line 101, in execute
return self.cursor.execute(query, args)
File "/Users/gyanezc/Documents/Proyectos/corem-alher/envosx/lib/python2.7/site-packages/MySQLdb/cursors.py", line 205, in execute
self.errorhandler(self, exc, value)
File "/Users/gyanezc/Documents/Proyectos/corem-alher/envosx/lib/python2.7/site-packages/MySQLdb/connections.py", line 36, in defaulterrorhandler
raise errorclass, errorvalue
django.db.utils.IntegrityError: (1215, 'Cannot add foreign key constraint')