Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!eu.feeder.erje.net!newsfeed.xs4all.nl!newsfeed3.news.xs4all.nl!xs4all!post.news.xs4all.nl!not-for-mail Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.003 X-Spam-Evidence: '*H*': 0.99; '*S*': 0.00; 'schema': 0.05; 'subject:code': 0.07; 'ugly': 0.07; 'migration': 0.09; 'occasionally': 0.09; 'part,': 0.09; 'received:80.91': 0.09; 'received:80.91.229': 0.09; 'received:gmane.org': 0.09; 'received:list': 0.09; 'yeah,': 0.09; 'api': 0.11; 'django': 0.11; 'finney': 0.16; 'received:80.91.229.3': 0.16; 'received:plane.gmane.org': 0.16; 'roy': 0.16; 'sqlalchemy': 0.16; 'subject:python': 0.16; 'ignore': 0.16; 'separate': 0.22; 'header :User-Agent:1': 0.23; 'together.': 0.24; 'versions': 0.24; "i've": 0.25; 'header:X-Complaints-To:1': 0.27; 'primarily': 0.30; 'strongly': 0.30; 'code': 0.31; 'religious': 0.31; 'writes:': 0.31; 'framework': 0.33; 'at:': 0.34; 'problem.': 0.35; 'tool': 0.35; 'but': 0.35; 'url:org': 0.36; 'ben': 0.38; 'to:addr:python- list': 0.38; 'to:addr:python.org': 0.39; 'received:org': 0.40; 'how': 0.40; 'most': 0.60; 'new': 0.61; 'developed': 0.63; 'our': 0.64; 'more': 0.64; 'different': 0.65; 'levels': 0.65; 'worth': 0.66; 'smith': 0.68; 'civilization': 0.84; 'received:125': 0.84; 'western': 0.86; 'favour': 0.91 X-Injected-Via-Gmane: http://gmane.org/ To: python-list@python.org From: Ben Finney Subject: Re: Keeping python code and database in sync Date: Sat, 30 Aug 2014 06:34:33 +1000 References: Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Gmane-NNTP-Posting-Host: jigong.madmonks.org X-Public-Key-ID: 0xAC128405 X-Public-Key-Fingerprint: 517C F14B B2F3 98B0 CB35 4855 B8B2 4C06 AC12 8405 X-Public-Key-URL: http://www.benfinney.id.au/contact/bfinney-pubkey.asc X-Post-From: Ben Finney User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux) Cancel-Lock: sha1:hLk8jUFHq94oLxpbrVqbH+YRP5M= X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: General discussion list for the Python programming language List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Newsgroups: comp.lang.python Message-ID: Lines: 34 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1409344487 news.xs4all.nl 2844 [2001:888:2000:d::a6]:38369 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:77285 Roy Smith writes: > Yeah, schema migration is an ugly problem. There's a number of tools > to help here, most of which reduce the suckitude, but don't eliminate > it completely. Some things you might want to look at: > > * SQLAlchemy Migrate > * alembic I can strongly recommend SQLAlchemy. It has several levels of working with the RDBMS, and they all work well together; you can code primarily to one API and occasionally use a different part, and it all works together. I've never used Alembic, but it is a migration tool built on SQLAlchemy. > * South (django-specific) It's worth noting the South is no longer developed as a separate library: Please note that South is now end of lifed in favour of the new migrations framework in Django 1.7, which is based on South but with significant design improvements. South will not work with Django 1.7; it supports only versions 1.4, 1.5 and 1.6. -- \ “I think Western civilization is more enlightened precisely | `\ because we have learned how to ignore our religious leaders.” | _o__) —Bill Maher, 2003 | Ben Finney