[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: upgrading database tables and data



On Sun, Apr 10, 2005 at 12:29:29PM -0600, David Everly wrote:
> Does anyone know of a package that I can look at that has a mechanism to
> run a series of certain SQL scripts based on upgrading from a certain
> version to a certain version?
> 
> For instance, when upgrading from 1.1-1 to 1.1-2, I want to delete a row
> from a table, when upgrading from 1.1-2 to 1.2-1, I want to alter a
> table, and when upgrading from 1.1-1 to 1.2-1, I want to do both of
> these actions (first the delete, then the alter).

I do this in the JFFNMS package. If you want to see how I did it make
sure you get one that uses the compare-versions features and not the old
way with a switch statement.

I do ask the admin if they want this done automatically.

  - Craig
-- 
Craig Small      GnuPG:1C1B D893 1418 2AF4 45EE  95CB C76C E5AC 12CA DFA5
Eye-Net Consulting http://www.enc.com.au/   MIEE         Debian developer
csmall at : enc.com.au                      ieee.org           debian.org



Reply to: