{"action":"closed","issue":{"url":"https://api.github.com/repos/omab/python-social-auth/issues/955","repository_url":"https://api.github.com/repos/omab/python-social-auth","labels_url":"https://api.github.com/repos/omab/python-social-auth/issues/955/labels{/name}","comments_url":"https://api.github.com/repos/omab/python-social-auth/issues/955/comments","events_url":"https://api.github.com/repos/omab/python-social-auth/issues/955/events","html_url":"https://github.com/omab/python-social-auth/issues/955","id":165935336,"number":955,"title":"Model issue when migrating from django-social-auth to python-social-auth","user":{"login":"JoeJasinski","id":417872,"avatar_url":"https://avatars.githubusercontent.com/u/417872?v=3","gravatar_id":"","url":"https://api.github.com/users/JoeJasinski","html_url":"https://github.com/JoeJasinski","followers_url":"https://api.github.com/users/JoeJasinski/followers","following_url":"https://api.github.com/users/JoeJasinski/following{/other_user}","gists_url":"https://api.github.com/users/JoeJasinski/gists{/gist_id}","starred_url":"https://api.github.com/users/JoeJasinski/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/JoeJasinski/subscriptions","organizations_url":"https://api.github.com/users/JoeJasinski/orgs","repos_url":"https://api.github.com/users/JoeJasinski/repos","events_url":"https://api.github.com/users/JoeJasinski/events{/privacy}","received_events_url":"https://api.github.com/users/JoeJasinski/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2016-07-16T16:04:04Z","updated_at":"2016-12-26T12:20:04Z","closed_at":"2016-12-26T12:20:04Z","body":"I'm running django 1.8 and am trying to migrate from django-social-auth to python-social-auth.  I'm using the newest released version of django-social-auth (0.7.28) and I'm trying to install the latest version python-social-auth.\n\nI've followed the directions in the porting guide in the docs. However, I noticed that the the model state of the django-social-auth 0.7.28 does not match the initial migration of the python-social-auth migration.  For example, the python-social-auth default module has models and fields in it in that are not in the state of my database from django-social-auth. \n\nI'm wondering what the model upgrade path is between django-social-auth and python-social-auth?  If I drop and recreate the social auth tables, will that irreversibly destroy the users and their social account, or will the same association get recreated next time they login in? \n\nHere is the original repo with django-social-auth:\nhttps://github.com/chicagopython/chipy.org/blob/master/requirements.txt#L17\n\nHere is the branch that I'm trying to upgrade to python-social-auth:\nhttps://github.com/JoeJasinski/chipy.org/blob/feature/cleanup-and-updates-2/requirements.txt\n\nThis is my current model state: \n\n```\nchipy_org=# \\d social_auth_association\n                                   Table \"public.social_auth_association\"\n   Column   |          Type          |                              Modifiers                               \n------------+------------------------+----------------------------------------------------------------------\n id         | integer                | not null default nextval('social_auth_association_id_seq'::regclass)\n server_url | character varying(255) | not null\n handle     | character varying(255) | not null\n secret     | character varying(255) | not null\n issued     | integer                | not null\n lifetime   | integer                | not null\n assoc_type | character varying(64)  | not null\nIndexes:\n    \"social_auth_association_pkey\" PRIMARY KEY, btree (id)\n\n\nchipy_org=# \\d social_auth_nonce;\n                                   Table \"public.social_auth_nonce\"\n   Column   |          Type          |                           Modifiers                            \n------------+------------------------+----------------------------------------------------------------\n id         | integer                | not null default nextval('social_auth_nonce_id_seq'::regclass)\n server_url | character varying(255) | not null\n timestamp  | integer                | not null\n salt       | character varying(40)  | not null\nIndexes:\n    \"social_auth_nonce_pkey\" PRIMARY KEY, btree (id)\n\n\nchipy_org=# \\d social_auth_usersocialauth;\n                                   Table \"public.social_auth_usersocialauth\"\n   Column   |          Type          |                                Modifiers                                \n------------+------------------------+-------------------------------------------------------------------------\n id         | integer                | not null default nextval('social_auth_usersocialauth_id_seq'::regclass)\n user_id    | integer                | not null\n provider   | character varying(32)  | not null\n uid        | character varying(255) | not null\n extra_data | text                   | not null\nIndexes:\n    \"social_auth_usersocialauth_pkey\" PRIMARY KEY, btree (id)\n    \"social_auth_usersocialauth_provider_uid_key\" UNIQUE CONSTRAINT, btree (provider, uid)\n    \"social_auth_usersocialauth_user_id\" btree (user_id)\nForeign-key constraints:\n    \"social_auth_usersocial_user_id_193b2d80880502b2_fk_auth_user_id\" FOREIGN KEY (user_id) REFERENCES auth_user(id) DEFERRABLE INITIALLY DEFERRED\n\n\nchipy_org=# \\d social_auth_usersocialauth_user_id \nIndex \"public.social_auth_usersocialauth_user_id\"\n Column  |  Type   | Definition \n---------+---------+------------\n user_id | integer | user_id\nbtree, for table \"public.social_auth_usersocialauth\"\n\n\n\n```\n"}}
{"actor":{"display_login":"omab"}}