From: Ian Jackson Subject: Re: [OSSTEST PATCH 5/8] Schema: Support database schema updates Date: Fri, 11 Dec 2015 15:34:04 +0000 Message-ID: <22122.60652.768657.919911@mariner.uk.xensource.com> References: <1449767545-9410-1-git-send-email-ian.jackson@eu.citrix.com> <1449767545-9410-6-git-send-email-ian.jackson@eu.citrix.com> <1449769713.9759.111.camel@citrix.com> <22121.48596.663367.284017@mariner.uk.xensource.com> <22121.50201.384653.237194@mariner.uk.xensource.com> <1449840716.30975.8.camel@citrix.com> <22122.59532.710311.955926@mariner.uk.xensource.com> <1449847105.30975.48.camel@citrix.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mail6.bemta5.messagelabs.com ([195.245.231.135]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1a7PuU-0005Eo-9d for xen-devel@lists.xenproject.org; Fri, 11 Dec 2015 15:47:06 +0000 In-Reply-To: <1449847105.30975.48.camel@citrix.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Ian Campbell Cc: xen-devel@lists.xenproject.org List-Id: xen-devel@lists.xenproject.org Ian Campbell writes ("Re: [OSSTEST PATCH 5/8] Schema: Support database schema updates"): > On Fri, 2015-12-11 at 15:15 +0000, Ian Jackson wrote: > > I can put this in a comment if you like. > > I suppose a comment next to any such override is a pretty good policy to > have. OK. See below; I have folded each hunk into the appropriate patch. > With that: Acked-by: Ian Campbell Thanks, Ian. diff --git a/mg-schema-create b/mg-schema-create index e15ecb9..9bb3040 100755 --- a/mg-schema-create +++ b/mg-schema-create @@ -67,9 +67,17 @@ while [ $# != 0 ]; do done export OSSTEST_DB_USEREAL_IGNORETEST='.*' +# Completely disable this safety catch, because it otherwise breaks +# when run on an empty schema (since there is no `tasks' table). +# +# It is not needed because if we are mistakenly operating on an +# existing database (test or real) we will bomb out because the first +# thing in `initial.sql' is to create the already-existing `flights' +# table ... . ./cri-getconfig +# ... Unless some update has been applied which removed `flights': updates_applied=$(./mg-schema-update list-applied) if [ "x$updates_applied" != x ]; then ./mg-schema-update show