Name | Modified | Size | Downloads / Week |
---|---|---|---|
Parent folder | |||
README.dbalter | 2020-05-11 | 2.6 kB | |
Totals: 1 Item | 2.6 kB | 0 |
dbalter - Update Informix database table structure INTRODUCTION dbalter(1L) is an isqlperl script which, given an Informix database and a file of SQL statements to create a database, will update the database to to same structure as the script, retaining the data. PREREQUISITES This needs isqlperl v>=1.2, Perl with Informix SQL extensions and of course a properly installed Informix SQL. LIMITATIONS This version of dbalter directly executes *all* commands in the SQL-script except CREATE TABLE which is processed specially. It it does not validate the commands. dbalter has only been tested with "INFORMIX-SQL Version 2.10.03F", but should work with any version. The "algorithm" is pretty simple minded ... but works for me. I hope it is obvious from the code. I have tried to make the the program failsafe -- It's my (customers) data I'm playing with -- but if it goes wrong :-( my comiserations. TO DO Add any improvements suggested by you, dear reader :-) Add changes for Informix v5 if^H^Hwhen I get time to convert to it. BACKGROUND [reminise mode: on] Back in the dawn of time, in about 1983 I started using Informix v3.10? (the pre-SQL Informix) because it was really neat and it could access the data files of our COBOL application. To create a table you could do: dbbuild schema-file where schema-file was a description of the table structure. To change the structure of a table you could do: dbbuild -r schema-file dbbuild would list the differences and ask for confirmation, then convert the file to the new format. ... time passes ... Now I'm managing another programmer, the technicians, the support/training staff and occasionally programming in Uniface with I-SQL. I'm writing, installing, training and supporting an all-singing, all-dancing, front-office application for lawyers. The system is continuously changing: new customers get the latest "snapshot" of the system. This is OK until I need to upgrade the customer. I've tried poring over lists of the table structures, it's difficult(impossible) to do right and *s*l*o*w*. I've tried keeping the SQL &/or programs used to alter the database structure, but when I get to the customer site, there is always some missing. Uniface produces SQL to create the database, but Informix-SQL doesn't have "dbbuild -r" to update the structure for me ... so ... dbalter. [reminise mode: off] COPYRIGHT Copyright (C) 1994 Chris Benson, <chrisb@jesmond.demon.co.uk> Use it how you want except (a) retain my copyright msg, (b) don't blame me if it fails. Please send me your suggestions/comments/ideas.