{"action":"created","issue":{"url":"https://api.github.com/repos/zestedesavoir/zds-site/issues/3584","repository_url":"https://api.github.com/repos/zestedesavoir/zds-site","labels_url":"https://api.github.com/repos/zestedesavoir/zds-site/issues/3584/labels{/name}","comments_url":"https://api.github.com/repos/zestedesavoir/zds-site/issues/3584/comments","events_url":"https://api.github.com/repos/zestedesavoir/zds-site/issues/3584/events","html_url":"https://github.com/zestedesavoir/zds-site/issues/3584","id":152885539,"number":3584,"title":"Problèmes de migrations (ZEP25 + suppression des anciennes tables)","user":{"login":"sandhose","id":1549952,"avatar_url":"https://avatars.githubusercontent.com/u/1549952?v=3","gravatar_id":"","url":"https://api.github.com/users/sandhose","html_url":"https://github.com/sandhose","followers_url":"https://api.github.com/users/sandhose/followers","following_url":"https://api.github.com/users/sandhose/following{/other_user}","gists_url":"https://api.github.com/users/sandhose/gists{/gist_id}","starred_url":"https://api.github.com/users/sandhose/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sandhose/subscriptions","organizations_url":"https://api.github.com/users/sandhose/orgs","repos_url":"https://api.github.com/users/sandhose/repos","events_url":"https://api.github.com/users/sandhose/events{/privacy}","received_events_url":"https://api.github.com/users/sandhose/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":{"url":"https://api.github.com/repos/zestedesavoir/zds-site/milestones/31","html_url":"https://github.com/zestedesavoir/zds-site/milestones/Version%2018","labels_url":"https://api.github.com/repos/zestedesavoir/zds-site/milestones/31/labels","id":1604052,"number":31,"title":"Version 18","description":"","creator":{"login":"SpaceFox","id":5786268,"avatar_url":"https://avatars.githubusercontent.com/u/5786268?v=3","gravatar_id":"","url":"https://api.github.com/users/SpaceFox","html_url":"https://github.com/SpaceFox","followers_url":"https://api.github.com/users/SpaceFox/followers","following_url":"https://api.github.com/users/SpaceFox/following{/other_user}","gists_url":"https://api.github.com/users/SpaceFox/gists{/gist_id}","starred_url":"https://api.github.com/users/SpaceFox/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SpaceFox/subscriptions","organizations_url":"https://api.github.com/users/SpaceFox/orgs","repos_url":"https://api.github.com/users/SpaceFox/repos","events_url":"https://api.github.com/users/SpaceFox/events{/privacy}","received_events_url":"https://api.github.com/users/SpaceFox/received_events","type":"User","site_admin":false},"open_issues":5,"closed_issues":76,"state":"open","created_at":"2016-02-24T22:33:37Z","updated_at":"2016-05-11T08:46:46Z","due_on":null,"closed_at":null},"comments":9,"created_at":"2016-05-03T22:06:32Z","updated_at":"2016-05-11T20:30:26Z","closed_at":null,"body":"Pendant la commande `python manage.py migrate_to_zep25`:\r\n\r\n```\r\n[ZEP-25] : New category \"Physique\" for content \"La science au Moyen-e et sous l'Ancien Régime : l'exemple des comètes\"\r\n[ZEP-25] : New category \"Physique\" for content \"La limite de Landauer\"\r\n[ZEP-25] : New category \"Physique\" for content \"La physique au temps de Newton\"\r\n[ZEP-25] : New category \"Physique\" for content \"Pourquoi devons-nous changer de téléviseur en 2016?\"\r\n[ZEP-25] : New category \"Physique\" for content \"Comment marchent les disjoncteurs?\"\r\nTraceback (most recent call last):\r\n  File \"manage.py\", line 11, in <module>\r\n    execute_from_command_line(sys.argv)\r\n  File \"/opt/zdsenv/local/lib/python2.7/site-packages/django/core/management/__init__.py\", line 354, in execute_from_command_line\r\n    utility.execute()\r\n  File \"/opt/zdsenv/local/lib/python2.7/site-packages/django/core/management/__init__.py\", line 346, in execute\r\n    self.fetch_command(subcommand).run_from_argv(self.argv)\r\n  File \"/opt/zdsenv/local/lib/python2.7/site-packages/django/core/management/base.py\", line 394, in run_from_argv\r\n    self.execute(*args, **cmd_options)\r\n  File \"/opt/zdsenv/local/lib/python2.7/site-packages/raven/contrib/django/management/__init__.py\", line 41, in new_execute\r\n    return original_func(self, *args, **kwargs)\r\n  File \"/opt/zdsenv/local/lib/python2.7/site-packages/django/core/management/base.py\", line 445, in execute\r\n    output = self.handle(*args, **options)\r\n  File \"/opt/zdsenv/ZesteDeSavoir/zds/tutorialv2/management/commands/migrate_to_zep25.py\", line 284, in handle\r\n    self.migrate_zds()\r\n  File \"/opt/zdsenv/ZesteDeSavoir/zds/tutorialv2/management/commands/migrate_to_zep25.py\", line 231, in migrate_zds\r\n    subcategory = SubCategory.objects.get(title=subcat)\r\n  File \"/opt/zdsenv/local/lib/python2.7/site-packages/django/db/models/manager.py\", line 127, in manager_method\r\n    return getattr(self.get_queryset(), name)(*args, **kwargs)\r\n  File \"/opt/zdsenv/local/lib/python2.7/site-packages/django/db/models/query.py\", line 334, in get\r\n    self.model._meta.object_name\r\nzds.utils.models.DoesNotExist: SubCategory matching query does not exist.\r\n```\r\n\r\n---\r\n\r\nLors de la suppression des anciennes tables: (voir https://github.com/zestedesavoir/zds-site/blob/release-v18/update.md#supprimer-toute-trace-des-tables-pré-zep-12 )\r\n```\r\nmysql> UPDATE tutorial_tutorial SET last_note_pk=NULL;\r\nERROR 1054 (42S22): Unknown column 'last_note_pk' in 'field list'\r\nmysql> UPDATE article_article SET last_reaction=NULL;\r\nERROR 1054 (42S22): Unknown column 'last_reaction' in 'field list'\r\nmysql> DROP TABLE tutorial_tutorial_subcategory;\r\nERROR 1051 (42S02): Unknown table 'tutorial_tutorial_subcategory'\r\nmysql> DROP TABLE tutorial_tutorial_authors;\r\nQuery OK, 0 rows affected (0.08 sec)\r\n\r\nmysql> DROP TABLE tutorial_note;\r\nERROR 1217 (23000): Cannot delete or update a parent row: a foreign key constraint fails\r\nmysql> DROP TABLE tutorial_tutorialread;\r\nQuery OK, 0 rows affected (0.02 sec)\r\nmysql> DROP TABLE tutorial_tutorial;\r\nERROR 1217 (23000): Cannot delete or update a parent row: a foreign key constraint fails\r\nmysql> DROP TABLE article_article_subcategory;\r\nERROR 1051 (42S02): Unknown table 'article_article_subcategory'\r\nmysql> DROP TABLE article_article_authors;\r\nQuery OK, 0 rows affected (0.06 sec)\r\n\r\nmysql> DROP TABLE article_reaction;\r\nERROR 1217 (23000): Cannot delete or update a parent row: a foreign key constraint fails\r\nmysql> DROP TABLE article_articleread;\r\nQuery OK, 0 rows affected (0.05 sec)\r\n\r\nmysql> DROP TABLE article_article;\r\nERROR 1217 (23000): Cannot delete or update a parent row: a foreign key constraint fails\r\n```"},"comment":{"url":"https://api.github.com/repos/zestedesavoir/zds-site/issues/comments/218580571","html_url":"https://github.com/zestedesavoir/zds-site/issues/3584#issuecomment-218580571","issue_url":"https://api.github.com/repos/zestedesavoir/zds-site/issues/3584","id":218580571,"user":{"login":"GerardPaligot","id":1913901,"avatar_url":"https://avatars.githubusercontent.com/u/1913901?v=3","gravatar_id":"","url":"https://api.github.com/users/GerardPaligot","html_url":"https://github.com/GerardPaligot","followers_url":"https://api.github.com/users/GerardPaligot/followers","following_url":"https://api.github.com/users/GerardPaligot/following{/other_user}","gists_url":"https://api.github.com/users/GerardPaligot/gists{/gist_id}","starred_url":"https://api.github.com/users/GerardPaligot/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/GerardPaligot/subscriptions","organizations_url":"https://api.github.com/users/GerardPaligot/orgs","repos_url":"https://api.github.com/users/GerardPaligot/repos","events_url":"https://api.github.com/users/GerardPaligot/events{/privacy}","received_events_url":"https://api.github.com/users/GerardPaligot/received_events","type":"User","site_admin":false},"created_at":"2016-05-11T20:30:26Z","updated_at":"2016-05-11T20:30:26Z","body":"Merci @gustavi "}}