From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from lists.gentoo.org ([140.105.134.102] helo=robin.gentoo.org) by nuthatch.gentoo.org with esmtp (Exim 4.60) (envelope-from ) id 1FqzNp-0006Ax-7b for garchives@archives.gentoo.org; Thu, 15 Jun 2006 21:28:09 +0000 Received: from robin.gentoo.org (localhost [127.0.0.1]) by robin.gentoo.org (8.13.7/8.13.6) with SMTP id k5FLPpvq016307; Thu, 15 Jun 2006 21:25:51 GMT Received: from popmail.jettissystems.com (popmail.jettissystems.com [38.118.146.212]) by robin.gentoo.org (8.13.7/8.13.6) with ESMTP id k5FLGmpu010587 for ; Thu, 15 Jun 2006 21:16:49 GMT Received: from [192.168.0.104] (c-69-181-70-226.hsd1.ca.comcast.net [69.181.70.226]) by popmail.jettissystems.com (Postfix) with ESMTP id C9DC456D486 for ; Thu, 15 Jun 2006 14:16:47 -0700 (PDT) Message-ID: <4491CE3C.9030202@badapple.net> Date: Thu, 15 Jun 2006 14:16:44 -0700 From: kashani User-Agent: Thunderbird 1.5.0.4 (Windows/20060516) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-user@gentoo.org Reply-to: gentoo-user@lists.gentoo.org MIME-Version: 1.0 To: gentoo-user@lists.gentoo.org Subject: Re: [gentoo-user] [OT] Looking for a tool to produce 'reverse' SQL References: <20060615205451.27681.qmail@web53204.mail.yahoo.com> In-Reply-To: <20060615205451.27681.qmail@web53204.mail.yahoo.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Archives-Salt: d6fad2f9-359e-4070-8a94-7c8ed1630257 X-Archives-Hash: 60b0de6cf1571b81249d626f5fe798cb Benjamin Blazke wrote: > > --- kashani wrote: > >> The tool you're looking for is called a DBA. :-) > > I see. So it's up to QA to test extensively and up to > the DBA to recover from a disaster. > > I hoped there would be a more automated solution but > it seems that it's not really doable. Thanks for such > a quick answer ;-) That's pretty much the way we've been doing it, but if there is a better way I'd like to hear it too as I'm a poor imitation of a DBA. However I don't see any easy solutions for combined application, data, schema change rollbacks especially when changes to one cause dependencies in others. As an illustration you change u_user.login_name to varchar(64) from varchar(32). Users start creating longer users names. A few hours later you find some problems in how your application handles longer names. If you needed to rollback the alter table command is easy, but some of your data would now be invalid. Rather than rollback the easier fix is to update the application and hopefully the change is a single file update. I still think there are cases when you could rollback, but they'd have to be so simple that having a tool to generate the sql would be overkill. Ramin -- gentoo-user@gentoo.org mailing list