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.

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
http://lists.xen.org/xen-devel

Reply via email to