divio / django-simple-sso

Other
307 stars 116 forks source link

migration file missing? #30

Closed XaviP closed 5 years ago

XaviP commented 6 years ago

It seems that a migration file is missing in the package (django-simple-sso==0.13.2, django 1.11, py 3.5)

python manage.py makemigrations --dry-run
venv/lib/python3.5/site-packages/simple_sso/sso_server/migrations/0003_auto_20180405_0822.py
    - Alter field private_key on consumer
    - Alter field public_key on consumer
    - Alter field access_token on token
    - Alter field request_token on token
avalanchy commented 5 years ago

Yeah, I have the same issue.

Running migrate results with

Running migrations:
  No migrations to apply.
  Your models have changes that are not yet reflected in a migration, and so won't be applied.
  Run 'manage.py makemigrations' to make new migrations, and then re-run 'manage.py migrate' to apply them.

Running makemigrations:

Migrations for 'sso_server':
  venv/lib/python3.7/site-packages/simple_sso/sso_server/migrations/0003_m.py
    - Alter field private_key on consumer
    - Alter field public_key on consumer
    - Alter field access_token on token
    - Alter field request_token on token

The fix appears to be removing byte strings from 0001_initial.py:

sed -i "s/b'/'/" backend/venv/lib/python3.7/site-packages/simple_sso/sso_server/migrations/0001_initial.py

Any clues on how to bypass this but not by a fork, waiting for a new version or by overwriting Django commands?

GaretJax commented 5 years ago

This has been fixed in 0.14.1.