Re: Testing Database Schema

2004-07-22 Thread Tim Bunce
On Mon, Jul 19, 2004 at 05:00:05AM -0700, Ask Bjoern Hansen wrote: > [EMAIL PROTECTED] (Tony Bowden) writes: > > [...] > > The two "best" ideas we've had so far are to either run the SQL in the > > code against a temporary database, and then compare both SHOW CREATE > > TABLE outputs, or to use so

Re: Testing Database Schema

2004-07-22 Thread Tony Bowden
On Sun, Jul 18, 2004 at 04:49:24PM +0200, James Mastros wrote: > Change the procedure to require the bit after __DATA__ to match what > mysql gives you back? This is actually better then what you do anyway, > as what mysql gives you is significantly more detailed. We considered that, but, among

Re: Testing Database Schema

2004-07-22 Thread Ask Bjoern Hansen
[EMAIL PROTECTED] (Tony Bowden) writes: [...] > > > lots of SQL to a common format. Both seem much too cumbersome, however. > > > Anyone have any brighter ideas? > > Don't use a temporary database, just a temporary table. > > Surely that's more work? That depends on how you open your databases a

Re: Testing Database Schema

2004-07-22 Thread Ask Bjoern Hansen
[EMAIL PROTECTED] (Tony Bowden) writes: [...] > The two "best" ideas we've had so far are to either run the SQL in the > code against a temporary database, and then compare both SHOW CREATE > TABLE outputs, or to use something like SQL::Translator to convert both > lots of SQL to a common format.

Re: Testing Database Schema

2004-07-22 Thread James Mastros
Tony Bowden wrote: We have an in-house procedure that says that the SQL definition for a table should be included in the __DATA__ section of the class that represents it (we're using Class::DBI), and is to be treated as the definitive version of the schema. [cut] We're having too much difficulty th

Re: Testing Database Schema

2004-07-19 Thread Michael G Schwern
On Mon, Jul 19, 2004 at 10:19:47AM +0100, Tony Bowden wrote: > On Mon, Jul 19, 2004 at 03:22:05AM -0400, Michael G Schwern wrote: > > > The two "best" ideas we've had so far are to either run the SQL in the > > > code against a temporary database, and then compare both SHOW CREATE > > > TABLE outpu

Re: Testing Database Schema

2004-07-19 Thread Tony Bowden
On Mon, Jul 19, 2004 at 03:22:05AM -0400, Michael G Schwern wrote: > > The two "best" ideas we've had so far are to either run the SQL in the > > code against a temporary database, and then compare both SHOW CREATE > > TABLE outputs, or to use something like SQL::Translator to convert both > > lots

Re: Testing Database Schema

2004-07-19 Thread Michael G Schwern
On Sun, Jul 18, 2004 at 10:50:59AM +0100, Tony Bowden wrote: > The two "best" ideas we've had so far are to either run the SQL in the > code against a temporary database, and then compare both SHOW CREATE > TABLE outputs, or to use something like SQL::Translator to convert both > lots of SQL to a c

Testing Database Schema

2004-07-18 Thread Tony Bowden
We have an in-house procedure that says that the SQL definition for a table should be included in the __DATA__ section of the class that represents it (we're using Class::DBI), and is to be treated as the definitive version of the schema. When the code gets deployed to a new server, we'd like to