On Wed, 18 Oct 2006, Chris Hilton wrote:
> A couple of points: > > 1. The diffing code is as good or better than it ever was, so I don't > think that should hold up a release. Especially since it has seemed to > be little used in the past besides me, but maybe that's changed? Yes, the schema versioning code in DBIx::Class uses it to produce diffs for schma upgrades. > > 2. I'm all for refactoring the diffing code (having written a fair share > of it), but it's not going to be that easy. Not every schema alteration > is a simple line of output, some of them involve multiple steps out of > order of everything else, and other oddities. It can be worked out and > should be done, but I think it's more like something that could/should > go into its own release cycle, not tacked onto a waiting release. Possibly.. I'd like to at least get in something that moans about types of diffs it cant do.. at the moment you just get whatever the if Orac;le/MSSQLServer/etc checks default to, which isnt necessarily something that makes any sense for the database/producer. (in my case, DB2). .. Even if thats just a plain list of ones we can cope with, to start with. I'm not actually sure, could you add one? > 3. Hopefully a helpful suggestion: Reading your description below, > perhaps we should add some sort of "--output-schema" option while doing > this that would by default be the same as the target schema, but could > be overridden. This way, you could still diff two schemas that SQLT > knows how to parse, but if it doesn't know how to generate diffs, you > could output to some other schema it does know how to generate diffs > for. Sounds like a good idea to me. Although in DBIx::Class' case, its going to be the same one or not at all. > > I can probably provide some tests/testing (the diffing tool is very > important to our build process and it gets quite a workout), but I'm > afraid I don't have time to do more (too much other stuff to fix!). Tests to keep things working the way you like them would be great! I keep looking at the diffing code and thinking "where do I start?" ;) Jess > > Chris > >> -----Original Message----- >> From: [EMAIL PROTECTED] >> [mailto:[EMAIL PROTECTED] On >> Behalf Of Jess Robinson >> Sent: Wednesday, 18 October, 2006 08:17 >> To: [email protected]; >> [EMAIL PROTECTED] >> Subject: [sqlfairy-developers] SQL::Translator 0.08 - needed >> for release >> >> >> I keep getting thumped about this, so here goes: >> >> In general, 0.08_01 seems usable, since many DBIx::Class >> folks are already using it, so if I've missed any complaints >> or patches, please send them to me or the sqlfairy list. >> >> What I'd like to add/finish, before releasing 0.08 is a chunk >> of fixing to the diffing code, currently it lives in its own >> little world, and makes up the SQL as it goes along (See >> SQL::Translator::Diff, extracted from sqlt-diff into a >> module). I've been adding functions to the database-Producer >> modules like "alter_field", "add_field", "drop_field" >> which produce the sql needed for the appropriate database, >> given SQLT schema objects (c.f. >> SQL::Translator::Schema::Field etc). These are still needed >> in some places, e.g. SQLite, which only supports a minimal >> subset of ALTER, and probably needs DROP TABLE, CREATE TABLE >> for most things (ick). >> >> So SQL::Translator::Diff needs to: >> >> 1) check if the producer its asked to translate to supports >> diffing (i.e. >> the alter functions) >> 2) actually call the alter functions to produce the SQL >> 3) probably be split into "diff_table", "diff_field" etc to make >> it more readable. >> 4) still pass it's tests ;) >> 5) have tests for all the different DBs supported >> 6) ?? - I must have missed something.. >> >> Then I think we're good to go.. Any volunteers? tests? ;) >> >> Jess >> >> >> -------------------------------------------------------------- >> ----------- >> Using Tomcat but need to do more? Need to support web >> services, security? >> Get stuff done quickly with pre-integrated technology to make >> your job easier Download IBM WebSphere Application Server >> v.1.0.1 based on Apache Geronimo >> http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057& >> dat=121642 >> -- >> sqlfairy-developers mailing list >> [EMAIL PROTECTED] >> https://lists.sourceforge.net/lists/listinfo/sqlfairy-developers >> > > ------------------------------------------------------------------------- Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 -- sqlfairy-developers mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/sqlfairy-developers
