New script schema-upgrade.py to help with database schema upgrades

1 view
Skip to first unread message

Reid Priedhorsky

unread,
May 4, 2010, 5:30:02 PM5/4/10
to cyclop...@googlegroups.com
Hi all,

I'm about to check in a script called schema-upgrade.py which partially
automates the process of upgrading database schema. Here's a sample run:

> 155 [reid@ugly scripts]$ ./schema-upgrade.py
> *** Upgrade script status: 83 available, 81 in database, 2 needed.
> *** 084-foo.sql
> *** 085-bar.sql
> %%% Run 084-foo.sql now? (y/n) y
> ?column?
> ----------
> 1
> (1 row)
>
> %%% Continue (i.e., was everything OK above)? (y/n) y
> *** Script recorded.
> *** Upgrade script status: 83 available, 82 in database, 1 needed.
> *** 085-bar.sql
> %%% Run 085-bar.sql now? (y/n) y
> %%% Continue (i.e., was everything OK above)? (y/n) y
> *** Script recorded.
> *** Upgrade script status: 83 available, 83 in database, 0 needed.
> *** Ran 2 schema upgrade scripts; exiting.

Note that you need to be in the scripts directory to run it.

This also affects where database upgrade scripts are stored: they have
been moved from scripts/sql to scripts/schema. Please update branches
accordingly.

Thanks,

Reid

--
You received this message because you are subscribed Cyclopath Development.
To post to this group: send email to cyclop...@googlegroups.com
To read this group on the Web: http://groups.google.com/group/cyclopath-dev
To unsubscribe from this group: send email to
cyclopath-de...@googlegroups.com
Reply all
Reply to author
Forward
0 new messages