From: Ian Jackson Subject: Re: [OSSTEST PATCH 5/8] Schema: Support database schema updates Date: Fri, 11 Dec 2015 15:08:02 +0000 Message-ID: <22122.59090.873061.487659@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> <1449835134.29268.8.camel@citrix.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mail6.bemta3.messagelabs.com ([195.245.230.39]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1a7PIo-00016Q-M7 for xen-devel@lists.xenproject.org; Fri, 11 Dec 2015 15:08:10 +0000 In-Reply-To: <1449835134.29268.8.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 Thu, 2015-12-10 at 18:00 +0000, Ian Jackson wrote: > > It does say that updates are applied in order. > > Right I was considering an osstest repo with 01 and 03 in it, which is > applied and all up to date, but then someone adds 02 and applies it > (therefore after 03). In think in principle this is OK if it is OK, IYSWIM. If not then perhaps we need a dependency system but let's not go there :-). > > So, application of nonexistent schema changes is indeed prevented by > > their nonexistence. > > Right, I was just wanting to check that you didn't have some mad scheme in > mind for knowing about things which don't exist. :-). > It occurs to me now that while "update-foo" might not exist in the > osstest.git where ./mg-schema-update is being run, it might exist in > another one and therefore have been applied and be present in the database. Indeed. ./mg-schema-update should display such things correctly. Let me try it and see... (osstest)mariner:testing.git> rm schema/schema-updates.sql (osstest)mariner:testing.git> OSSTEST_CONFIG=/u/iwj/.xen-osstest/config:local-config.test-database_iwj ./mg-schema-update -oHEAD show Name Worktree HEAD DB update schema-updates - 1 Harml 2015-12-11 15:06:45 Z drop-old-resource-log 2 Harml 2 Harml 2015-12-11 15:06:45 Z (osstest)mariner:testing.git> OSSTEST_CONFIG=/u/iwj/.xen-osstest/config:local-config.test-database_iwj ./mg-schema-update show Name Worktree DB update schema-updates - 2015-12-11 15:06:45 Z drop-old-resource-log 2 Harml 2015-12-11 15:06:45 Z (osstest)mariner:testing.git> ... which is as I would hope. Ian.