Skip to content
This repository has been archived by the owner on Feb 15, 2021. It is now read-only.

corsheaders makes dumpdata management command unavailable #16

Open
gergelypolonkai opened this issue Apr 18, 2016 · 8 comments
Open

corsheaders makes dumpdata management command unavailable #16

gergelypolonkai opened this issue Apr 18, 2016 · 8 comments
Assignees

Comments

@gergelypolonkai
Copy link

$ python manage.py dumpdata
CommandError: Unable to serialize database: relation "corsheaders_corsmodel" does not exist
LINE 1: ...smodel"."id", "corsheaders_corsmodel"."cors" FROM "corsheade...

Manually running makemigrations also doesn’t help, because there is no migrations module exists under corsheaders. I know from the sources that it is optional (and undocumented!) to use a model for whitelisting, but bricking management commands is not a Good Way To Go™

Adding corsheaders/migrations/__init__.py solves the problem, though.

@gustavi gustavi added the bug label Apr 18, 2016
@gustavi
Copy link

gustavi commented Apr 18, 2016

Thanks for the report. Fix incoming soon.

@GuillaumeCisco
Copy link

This fix is important.
It should be handled quickly.
Thanks @gergelypolonkai

@cwisecarver
Copy link

I just ran python manage.py makemigrations corsheaders && python manage.py migrate corsheaders and it created the migrations and applied them. The dumpdata --all command worked then.

@mitar
Copy link

mitar commented Aug 23, 2016

This is really problematic. :-(

@IlianIliev
Copy link

@vhf Sorry, I think I am missing something here. Why are you adding empty migration instead of a real one?
Also why does the model even exists as it is never populated with data?

@vhf
Copy link

vhf commented Jan 18, 2017

@IlianIliev please submit a better patch.

@IlianIliev
Copy link

@vhf any comments?

@IlianIliev
Copy link

I just found out that I have made a mistake and the migrations were not actually installed which led to issues when running some commands e.g. flush. However the PR is now updated and working.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

7 participants