Schema editor changes feedback request

77 views
Skip to first unread message

Michael Manfre

unread,
Jan 4, 2014, 11:29:14 AM1/4/14
to django-d...@googlegroups.com
I've been working on making django-mssql support the schema migration changes that will be part of Django 1.7 and have a pull request [1] that is mostly complete. Before I continue down my current path, I'd like to solicit some feedback to help ensure my changes will get merged.

I am currently able to pass all but 2 of the schema and migrations tests. The most challenging failure is due to MSSQL's limitations with regards to adding autoincrement to an existing column. The usual approach for doing this sort of migration requires swapping in a new table with the existing data, and fixing up all of the foreign keys. I may just document as "not supported, use a commercial product, such as RedGate's SQLcompare, or make the schema changes manually". 

For reference to see how I plan to use the API changes from my pull request, see django-mssql's schema.py [2].



Regards,
Michael Manfre

Andrew Godwin

unread,
Jan 5, 2014, 7:13:31 PM1/5/14
to django-d...@googlegroups.com
I've left some comments on the PR - the overall approach is fine, and I'm in favour of things like removing quote_parameter and adding params to the deferred_sql entries - but there's a few stylistic questions and I'm worried why you've removed the maximum index name length stuff.

As for not being able to add autoincrement to an existing column - I'd say it's fine for you to state it's not supported and just raise a hard error when it happens. The situation is very rare and I doubt a lot of people will run into it.

Andrew


--
You received this message because you are subscribed to the Google Groups "Django developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-develop...@googlegroups.com.
To post to this group, send email to django-d...@googlegroups.com.
Visit this group at http://groups.google.com/group/django-developers.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-developers/CAGdCwBu7dkBLk-kunGvuovGqTvwkOLfBzJ1B5AwpWqFyR-xLeg%40mail.gmail.com.
For more options, visit https://groups.google.com/groups/opt_out.

Michael Manfre

unread,
Jan 5, 2014, 8:11:49 PM1/5/14
to django-d...@googlegroups.com
Thanks for the feedback. I've added answers to all of your questions and a few extra comments about why I did certain things. Feel free to ask more questions on the pull request or ping me on IRC.

Regards,
Michael Manfre


Reply all
Reply to author
Forward
0 new messages