Skip to content

Instantly share code, notes, and snippets.

@mathjazz
Created June 8, 2018 13:11
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mathjazz/13cdbe72b2ab010c46009de9e8f9a166 to your computer and use it in GitHub Desktop.
Save mathjazz/13cdbe72b2ab010c46009de9e8f9a166 to your computer and use it in GitHub Desktop.
Running migrations:
Applying base.0123_rename_translated_to_unreviewed... OK
Applying base.0124_recalculate-all-stats...Traceback (most recent call last):
File "./manage.py", line 20, in <module>
execute_from_command_line(sys.argv)
File "/Users/mathjazz/Desktop/pontoon/venv/lib/python2.7/site-packages/django/core/management/__init__.py", line 364, in execute_from_command_line
utility.execute()
File "/Users/mathjazz/Desktop/pontoon/venv/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/mathjazz/Desktop/pontoon/venv/lib/python2.7/site-packages/django/core/management/base.py", line 283, in run_from_argv
self.execute(*args, **cmd_options)
File "/Users/mathjazz/Desktop/pontoon/venv/lib/python2.7/site-packages/django/core/management/base.py", line 330, in execute
output = self.handle(*args, **options)
File "/Users/mathjazz/Desktop/pontoon/venv/lib/python2.7/site-packages/django/core/management/commands/migrate.py", line 204, in handle
fake_initial=fake_initial,
File "/Users/mathjazz/Desktop/pontoon/venv/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/mathjazz/Desktop/pontoon/venv/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/mathjazz/Desktop/pontoon/venv/lib/python2.7/site-packages/django/db/migrations/executor.py", line 244, in apply_migration
state = migration.apply(state, schema_editor)
File "/Users/mathjazz/Desktop/pontoon/venv/lib/python2.7/site-packages/django/db/migrations/migration.py", line 129, in apply
operation.database_forwards(self.app_label, schema_editor, old_state, project_state)
File "/Users/mathjazz/Desktop/pontoon/venv/lib/python2.7/site-packages/django/db/migrations/operations/special.py", line 193, in database_forwards
self.code(from_state.apps, schema_editor)
File "/Users/mathjazz/Desktop/pontoon/pontoon/base/migrations/0124_recalculate-all-stats.py", line 13, in calculate_all_stats
tr.calculate_stats()
File "/Users/mathjazz/Desktop/pontoon/pontoon/base/models.py", line 2753, in calculate_stats
fuzzy_strings_diff, unreviewed_strings_diff
File "/Users/mathjazz/Desktop/pontoon/pontoon/base/models.py", line 518, in adjust_stats
'unreviewed_strings',
File "/Users/mathjazz/Desktop/pontoon/venv/lib/python2.7/site-packages/django/db/models/base.py", line 808, in save
force_update=force_update, update_fields=update_fields)
File "/Users/mathjazz/Desktop/pontoon/venv/lib/python2.7/site-packages/django/db/models/base.py", line 838, in save_base
updated = self._save_table(raw, cls, force_insert, force_update, using, update_fields)
File "/Users/mathjazz/Desktop/pontoon/venv/lib/python2.7/site-packages/django/db/models/base.py", line 905, in _save_table
forced_update)
File "/Users/mathjazz/Desktop/pontoon/venv/lib/python2.7/site-packages/django/db/models/base.py", line 955, in _do_update
return filtered._update(values) > 0
File "/Users/mathjazz/Desktop/pontoon/venv/lib/python2.7/site-packages/django/db/models/query.py", line 664, in _update
return query.get_compiler(self.db).execute_sql(CURSOR)
File "/Users/mathjazz/Desktop/pontoon/venv/lib/python2.7/site-packages/django/db/models/sql/compiler.py", line 1204, in execute_sql
cursor = super(SQLUpdateCompiler, self).execute_sql(result_type)
File "/Users/mathjazz/Desktop/pontoon/venv/lib/python2.7/site-packages/django/db/models/sql/compiler.py", line 899, in execute_sql
raise original_exception
django.db.utils.IntegrityError: new row for relation "base_projectlocale" violates check constraint "base_projectlocale_approved_strings_6d47f625_check"
DETAIL: Failing row contains (32, 390646, 205, 8, -3, 0, 0, 2, 326, f).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment