Keeping python code and database in sync

Chris Angelico rosuav at gmail.com
Fri Aug 29 18:31:54 EDT 2014


On Sat, Aug 30, 2014 at 3:04 AM, Skip Montanaro <skip at pobox.com> wrote:
> On Fri, Aug 29, 2014 at 9:54 AM, Roy Smith <roy at panix.com> wrote:
>> Yeah, schema migration is an ugly problem.
>
> It's not really any worse than any other sort of complex data
> structure change, is it? If your persistent data lived in a pickle
> file, it would likely be as bad or worse.

Well, correct. The problem isn't because it's in a database; the
problem is a consequence of persistent structured data that can get
out of sync.

It's easy to solve in a simple way that breaks on any sort of
confusion. It takes a bit more complexity (like the scheme I
suggested) to handle a few more cases. It takes a lot more complexity
(like the migration tools Roy listed) to cope with lots of awkward
cases (I suspect at least some of them will handle back-levelling,
which my scheme doesn't). And I doubt any of them is absolutely
perfect.

>> ... suckitude ...
>
> Nice word. Let's use it more so my polly app will see it as a common
> word and maybe offer it to me in a potential XKCD 936 password. :-)
>
> suckitude suckitude suckitude suckitude suckitude suckitude suckitude
>

Yeah, it's a great word. As a general rule, suckitude increases with
the square of design complexity and superlinearly with number of bugs.
I'm not sure how suckitude is affected by bugs, exactly; possibly O(N
log N), because each bug has a small probability of affecting another
bug.

ChrisA



More information about the Python-list mailing list