Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Creating a unique nullable field and then altering it to be non-nullable no longer produces an error #77

Open
wants to merge 6 commits into
base: master
Choose a base branch
from

Conversation

ivissani
Copy link

Problem was that the unique index generated during the creation of the field was being run as a deferred_sql. But the alter field executed the statement to create the unique index in place. Therefore the deferred statement failed because an index with the same name already existed.

With this PR, the alter field removes any deferred statement that would attempt to create a unique index that has already been created.

@dcleveng
Copy link

Any idea when this may merged on the master branch? I'm seeing this issue pop up when trying to integrate djangorestframework-api-key into an existing project.

@ivissani
Copy link
Author

Any idea when this may merged on the master branch? I'm seeing this issue pop up when trying to integrate djangorestframework-api-key into an existing project.

I don't think this is going to be merged anytime soon. I've had no feedback at all. Besides this there are many other problems with this backend. I would recommend to stay away from Django+SQLServer whenever possible.

@dcleveng
Copy link

Thanks for the info. Unfortunately, my company uses SQL Server exclusively so I don't have much choice but to press forward.

@randlet
Copy link

randlet commented Mar 31, 2021

@dcleveng Microsoft has forked this backend and is developing it here https://github.com/microsoft/mssql-django

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

Successfully merging this pull request may close these issues.

3 participants