This makes test flights have different numbers to those currently in
production, which will help avoid accidents.

Signed-off-by: Ian Jackson <ian.jack...@eu.citrix.com>
---
v2: New patch
---
 mg-schema-test-database |   13 +++++++++++++
 1 file changed, 13 insertions(+)

diff --git a/mg-schema-test-database b/mg-schema-test-database
index 78f26db..b41a99b 100755
--- a/mg-schema-test-database
+++ b/mg-schema-test-database
@@ -430,6 +430,19 @@ END
 
        rm -f $t.tabledata.*
 
+       printf "flightseq..."
+
+       lastflight=$(psql_query <<END
+               SELECT last_value FROM flights_flight_seq
+END
+               )
+       newlastflight=$(( 10000 * (2 + $lastflight / 10000) ))
+
+       withtest psql_do <<END
+               ALTER SEQUENCE flights_flight_seq
+                       RESTART WITH $newlastflight;
+END
+
        #---------- actually borrow resources ----------
 
        printf "borrow..."
-- 
1.7.10.4


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

Reply via email to