Closed mauroveron closed 4 years ago
Please see the changelog warning about this:
You unfortunately have to first install 1.2.0 and do this:
manage.py makemigrations
manage.py migrate
Then you can install 1.3.0 and do it again:
manage.py makemigrations
manage.py migrate
The above approach helps with 2.0.0 version as well
In my case I couldn't go back and forth to 1.2 and 1.3 (as I was already with 2.3 on production after updating Django (long story.....)). In any case adding the columns manually using SQL (in postgres) as in the migrations on 1.2 make my day:
ALTER TABLE oauth2_provider_accesstoken ADD COLUMN source_refresh_token_id INTEGER REFERENCES oauth2_provider_refreshtoken(id) ON DELETE SET NULL;
ALTER TABLE oauth2_provider_refreshtoken ADD COLUMN revoked TIMESTAMP WITH TIME ZONE;
ALTER TABLE oauth2_provider_refreshtoken ALTER COLUMN revoked SET DEFAULT NULL;
Describe the bug I'm getting an error when creating a token that refers to a refresh token:
This started happening after an upgrade to
1.3.0
from1.0.0
.I was able to track down the missing column to the squashed migration 0001 here
I'm not sure if the column should be re-introduced or the code that refers to the refresh token should be updated?
To Reproduce The app just does a GET request to the
/authorize
endpoint and then POST request to the/token
endpoint, with the following details:This is where the error with the
source_refresh_token_id
happensExpected behavior I should get the access token
Version 1.3.0 after an upgrade from 1.0.0