{"action":"created","issue":{"url":"https://api.github.com/repos/cognoma/core-service/issues/98","repository_url":"https://api.github.com/repos/cognoma/core-service","labels_url":"https://api.github.com/repos/cognoma/core-service/issues/98/labels{/name}","comments_url":"https://api.github.com/repos/cognoma/core-service/issues/98/comments","events_url":"https://api.github.com/repos/cognoma/core-service/issues/98/events","html_url":"https://github.com/cognoma/core-service/pull/98","id":313450293,"number":98,"title":"Expand gene columns","user":{"login":"kurtwheeler","id":4026833,"avatar_url":"https://avatars1.githubusercontent.com/u/4026833?v=4","gravatar_id":"","url":"https://api.github.com/users/kurtwheeler","html_url":"https://github.com/kurtwheeler","followers_url":"https://api.github.com/users/kurtwheeler/followers","following_url":"https://api.github.com/users/kurtwheeler/following{/other_user}","gists_url":"https://api.github.com/users/kurtwheeler/gists{/gist_id}","starred_url":"https://api.github.com/users/kurtwheeler/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kurtwheeler/subscriptions","organizations_url":"https://api.github.com/users/kurtwheeler/orgs","repos_url":"https://api.github.com/users/kurtwheeler/repos","events_url":"https://api.github.com/users/kurtwheeler/events{/privacy}","received_events_url":"https://api.github.com/users/kurtwheeler/received_events","type":"User","site_admin":false},"labels":[{"id":888984110,"url":"https://api.github.com/repos/cognoma/core-service/labels/in%20progress","name":"in progress","color":"ededed","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2018-04-11T19:07:51Z","updated_at":"2018-05-22T14:48:28Z","closed_at":null,"author_association":"MEMBER","pull_request":{"url":"https://api.github.com/repos/cognoma/core-service/pulls/98","html_url":"https://github.com/cognoma/core-service/pull/98","diff_url":"https://github.com/cognoma/core-service/pull/98.diff","patch_url":"https://github.com/cognoma/core-service/pull/98.patch"},"body":"### Motivation\r\n\r\nWhile trying to re-populate the database I ran into:\r\n```\r\nTraceback (most recent call last):\r\n  File \"manage.py\", line 10, in <module>\r\n    execute_from_command_line(sys.argv)\r\n  File \"/usr/local/lib/python3.5/site-packages/django/core/management/__init__.py\", line 353, in execute_from_command_line\r\n    utility.execute()\r\n  File \"/usr/local/lib/python3.5/site-packages/django/core/management/__init__.py\", line 345, in execute\r\n    self.fetch_command(subcommand).run_from_argv(self.argv)\r\n  File \"/usr/local/lib/python3.5/site-packages/django/core/management/base.py\", line 348, in run_from_argv\r\n    self.execute(*args, **cmd_options)\r\n  File \"/usr/local/lib/python3.5/site-packages/django/core/management/base.py\", line 399, in execute\r\n    output = self.handle(*args, **options)\r\n  File \"/code/api/management/commands/loaddata.py\", line 72, in handle\r\n    Gene.objects.bulk_create(gene_list)\r\n  File \"/usr/local/lib/python3.5/site-packages/django/db/models/manager.py\", line 122, in manager_method\r\n    return getattr(self.get_queryset(), name)(*args, **kwargs)\r\n  File \"/usr/local/lib/python3.5/site-packages/django/db/models/query.py\", line 447, in bulk_create\r\n    self._batched_insert(objs_with_pk, fields, batch_size)\r\n  File \"/usr/local/lib/python3.5/site-packages/django/db/models/query.py\", line 1056, in _batched_insert\r\n    using=self.db)\r\n  File \"/usr/local/lib/python3.5/site-packages/django/db/models/manager.py\", line 122, in manager_method\r\n    return getattr(self.get_queryset(), name)(*args, **kwargs)\r\n  File \"/usr/local/lib/python3.5/site-packages/django/db/models/query.py\", line 1039, in _insert\r\n    return query.get_compiler(using=using).execute_sql(return_id)\r\n  File \"/usr/local/lib/python3.5/site-packages/django/db/models/sql/compiler.py\", line 1060, in execute_sql\r\n    cursor.execute(sql, params)\r\n  File \"/usr/local/lib/python3.5/site-packages/django/db/backends/utils.py\", line 64, in execute\r\n    return self.cursor.execute(sql, params)\r\n  File \"/usr/local/lib/python3.5/site-packages/django/db/utils.py\", line 95, in __exit__\r\n    six.reraise(dj_exc_type, dj_exc_value, traceback)\r\n  File \"/usr/local/lib/python3.5/site-packages/django/utils/six.py\", line 685, in reraise\r\n    raise value.with_traceback(tb)\r\n  File \"/usr/local/lib/python3.5/site-packages/django/db/backends/utils.py\", line 64, in execute\r\n    return self.cursor.execute(sql, params)\r\ndjango.db.utils.DataError: value too long for type character varying(256)\r\n```\r\n\r\nThe differences between character and text in postgres is negligible these days, so I'm just converting the whole genes table to use TextField so I don't have to deal with this again.\r\n\r\n### Functional Tests\r\n\r\nI ran\r\n```\r\npython3 manage.py makemigrations\r\ndocker-compose up\r\ndocker exec -it <core-server-container> /bin/bash\r\npython3 manage.py acquiredata\r\npython3 manage.py loaddata\r\n```\r\nand it completed successfully."},"comment":{"url":"https://api.github.com/repos/cognoma/core-service/issues/comments/391018711","html_url":"https://github.com/cognoma/core-service/pull/98#issuecomment-391018711","issue_url":"https://api.github.com/repos/cognoma/core-service/issues/98","id":391018711,"user":{"login":"kurtwheeler","id":4026833,"avatar_url":"https://avatars1.githubusercontent.com/u/4026833?v=4","gravatar_id":"","url":"https://api.github.com/users/kurtwheeler","html_url":"https://github.com/kurtwheeler","followers_url":"https://api.github.com/users/kurtwheeler/followers","following_url":"https://api.github.com/users/kurtwheeler/following{/other_user}","gists_url":"https://api.github.com/users/kurtwheeler/gists{/gist_id}","starred_url":"https://api.github.com/users/kurtwheeler/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kurtwheeler/subscriptions","organizations_url":"https://api.github.com/users/kurtwheeler/orgs","repos_url":"https://api.github.com/users/kurtwheeler/repos","events_url":"https://api.github.com/users/kurtwheeler/events{/privacy}","received_events_url":"https://api.github.com/users/kurtwheeler/received_events","type":"User","site_admin":false},"created_at":"2018-05-22T14:48:28Z","updated_at":"2018-05-22T14:48:28Z","author_association":"MEMBER","body":"Yes it is ready for review. I think I opened it while I had some testing left to do, then forgot to ping @dhimmel "}}
{"actor":{"display_login":"kurtwheeler"}}