Keeping python code and database in sync

Frank Millman frank at chagford.com
Fri Aug 29 09:19:40 EDT 2014


"Rustom Mody" <rustompmody at gmail.com> wrote in message 
news:1cdf6e52-e09b-40f1-8db1-db6cbbee9512 at 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






More information about the Python-list mailing list