|Schema Alteration - Review needed!||Andrew Godwin||9/17/12 4:00 PM|
I have now, I believe, got a working, feature-complete schema alteration branch ready to go. It has full support for PostgreSQL, MySQL, and SQLite, and follows the rough design principles I emailed the list about a while back.
It's fully tested, but no documentation yet - I'm not sure what level of documentation we should give this, but it is my intention for it to be an API usable by third-party apps. In the meantime, the tests file should give you a reasonable idea of the way the API can be used (if you ignore the slightly cheap way to make new model classes - 'migrations' has a much nicer one of those).
It should be Python 3 compatible, too - I've checked the major pain points and run the test suite under Python 3, and it all passes.
The branch is schema-alteration in https://github.com/andrewgodwin/django
Handy link to the diff-with-master view: https://github.com/andrewgodwin/django/compare/schema-alteration
Feedback is very much welcomed - I want to get this merged in before the feature freeze.
There's doubtless some polishing and bugfixing that will be needed before final release, but I'll be keeping on top of that (by developing an app that uses it, partially) and making sure that 1.5 ships with something that's decently solid, and with an Oracle backend if I can get it working on my machine.
|Re: Schema Alteration - Review needed!||Alex_Gaynor||9/17/12 4:01 PM|
Can you put this in a pull-request so I can comment inline?
"I disapprove of what you say, but I will defend to the death your right to say it." -- Evelyn Beatrice Hall (summarizing Voltaire)
"The people's good is the highest law." -- Cicero
|Re: Schema Alteration - Review needed!||Andrew Godwin||9/17/12 4:11 PM|
I can indeed: https://github.com/django/django/pull/376
|Re: Schema Alteration - Review needed!||Jani Tiainen||9/17/12 10:02 PM|
18.9.2012 1:59, Andrew Godwin kirjoitti:
> Hi all,
>I can help with Oracle problems if you encounter a such thing since
that's my main backend I work with. (And I have to deal with all the
pain it causes)
- Well planned is half done and a half done has been sufficient before...
|Re: Schema Alteration - Review needed!||Andrew Godwin||9/18/12 8:49 AM|
An update from discussions with Alex and Anssi - I'm going to modify things a little so we don't have a Borg-pattern AppCache (i.e. you can instantiate it multiple times and get different caches), which should solve most of the problems currently caused by app cache state fiddling. Should take a day or two.
I can help with Oracle problems if you encounter a such thing since that's my main backend I work with. (And I have to deal with all the pain it causes)
Thanks Jani - that would be much appreciated. It should be possible to get a decent way just from the Oracle module, I'll let you know when I get around to it.
|Re: Schema Alteration - Review needed!||Andrew Godwin||9/21/12 5:05 PM|
Alright, I've now removed my AppCache state handling and replaced it with swappable AppCaches - surprisingly, doing this hasn't broken anything, but it did need an AppCacheWrapper to stop references going wrong.
The commits are here:
The SQLite test suite all passes after these changes, so this is looking good. Thoughts?