Ok, Gregg I will read your links...of course I will need some time Some comments in line
Greg Monroe ha scritto: > > > I agree TF here. It's hard and will always be wrong for someone or some > version of SQL. Remember Torque has to work across all major DB server. > But, as TF said, it's a good tool to get a basic snapshot that can be > modified > to match. IMHO, It's part of the nice rapid application development point of > view that Torque has. > > FWIW, if you dig into how you would do this, you find that you're dependent > on what the JDBC driver returns about the database. If I remember the JDBC > specs, the meta data you have to depend on has a lot of "holes" in it as far > as finding the underlying DB structure. Plus, there is a lot of variation > in how different drivers implement it. > > As I wrote answering to TF, using Postgres I didn't find any hole but maybe I was not using features to expose them. > > I think it's important to consider a couple of cases for SQL updates. The > first is the major structural changes that requires a lot of testing, etc. > as TF talks about above. > > The second is case is the additive / minor updates one. E.g. I've added more > tables to support more features and maybe a few columns to existing tables. > This is a much more straight forward change and sql-xml is very useful in > this. > > Exactly > FWIW, in the latter case, I tend to do is create the SQL build from the > *schema.xml that has been checked in. Create a new DB with tables from it. > Do an sql->xml process on the development/test DB and on the new DB. Compare > the two and resolve any "whoops... I added that column to the DB but not the > XML. Repeat until they match... (plus keep and eye out for missing > FK/Indices). > > Then I'll use this XML with the DDLUtils API to create the basic ALTER script. > It has the ability to do an compare of the real DB to an XML and create a > nice SQL script. This isn't perfect, but it's a good start and with some > review and quick editing, give me the script to run during the code upgrade. > > Ah ok: that is a good suggestion. I didn't know about DDL utils api until TF pointed them to me > Hope this isn't too confusing since I've been typing on it piece meal over > the day. > > I think it is quite clear. Now I have to make room in my schedule to find time to read your material. I hope to do next week , but I have two deliveries. ================================================== dott. Ivano Mario Luberti Archimede Informatica societa' cooperativa a r. l. Sede Operativa Via Gereschi 36 - 56126- Pisa tel.: +39-050- 580959 tel/fax: +39-050-9711344 web: www.archicoop.it ================================================== --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
