Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!eternal-september.org!feeder.eternal-september.org!news.stack.nl!newsfeed.xs4all.nl!newsfeed3a.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.009 X-Spam-Evidence: '*H*': 0.98; '*S*': 0.00; 'modify': 0.07; 'subject:code': 0.07; 'friday,': 0.09; 'meantime,': 0.09; 'received:80.91': 0.09; 'received:80.91.229': 0.09; 'received:gmane.org': 0.09; 'received:list': 0.09; 'python': 0.11; 'project,': 0.12; 'wrote': 0.14; 'bullet': 0.16; "chris'": 0.16; 'columns': 0.16; 'expects': 0.16; 'link,': 0.16; 'received:80.91.229.3': 0.16; 'received:plane.gmane.org': 0.16; 'subject:python': 0.16; 'wrote:': 0.18; 'features,': 0.24; 'skip:n 60': 0.24; 'looks': 0.24; 'tables': 0.26; 'downloaded': 0.26; 'certain': 0.27; 'header:X-Complaints-To:1': 0.27; '(like': 0.30; '(which': 0.31; 'code': 0.31; 'adequate': 0.31; 'run': 0.32; 'but': 0.35; 'there': 0.35; 'date.': 0.36; 'thanks': 0.36; 'url:org': 0.36; 'project': 0.37; 'implement': 0.38; 'sometimes': 0.38; 'to:addr:python-list': 0.38; 'bad': 0.39; 'to:addr:python.org': 0.39; 'received:org': 0.40; 'how': 0.40; 'ensure': 0.60; 'days': 0.60; 'read': 0.60; 'august': 0.61; 'new': 0.61; 'simple': 0.61; 'kept': 0.65; 'needs,': 0.65; 'frank': 0.68; 'study': 0.69; 'published': 0.71; 'bitten': 0.84; 'forced': 0.84; 'url:latest': 0.91 X-Injected-Via-Gmane: http://gmane.org/ To: python-list@python.org From: "Frank Millman" Subject: Re: Keeping python code and database in sync Date: Fri, 29 Aug 2014 15:19:40 +0200 References: <1cdf6e52-e09b-40f1-8db1-db6cbbee9512@googlegroups.com> X-Gmane-NNTP-Posting-Host: 197.87.50.124 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.3790.4657 X-RFC2646: Format=Flowed; Original X-MimeOLE: Produced By Microsoft MimeOLE V6.00.3790.4913 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: 40 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1409318383 news.xs4all.nl 2912 [2001:888:2000:d::a6]:46612 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:77273 "Rustom Mody" wrote in message news:1cdf6e52-e09b-40f1-8db1-db6cbbee9512@googlegroups.com... > On Friday, August 29, 2014 6:12:06 PM UTC+5:30, Frank Millman wrote: >> Hi all > >> Now that I have bitten the bullet and published my repository, I am >> forced >> to change my working practices (which is a good thing!). > >> The project is inherently database-driven. The python code expects to >> find >> certain tables and columns in the database. As I develop new features, I >> sometimes need to modify the database structure. In the bad old days >> (like >> yesterday) I would just make the modifications and carry on. Now I have >> to >> be aware that others may have downloaded the project, so I have to >> consider >> how to ensure that their database is kept up to date. > > > There are tools like this > http://alembic.readthedocs.org/en/latest/ > > It may help to read that to avoid reinvention > Thanks for the link, Rustom. I glanced at it, and it looks very powerful, but I will have to find the time to study it at leisure. In the meantime, Chris' suggestion is simple to implement and adequate for my present needs, so I will run with that for now. Frank