File tree 3 files changed +16
-2
lines changed
add-instance-updater-lock
3 files changed +16
-2
lines changed Original file line number Diff line number Diff line change @@ -17,7 +17,7 @@ use std::collections::BTreeMap;
17
17
///
18
18
/// This must be updated when you change the database schema. Refer to
19
19
/// schema/crdb/README.adoc in the root of this repository for details.
20
- pub const SCHEMA_VERSION : SemverVersion = SemverVersion :: new ( 65 , 0 , 0 ) ;
20
+ pub const SCHEMA_VERSION : SemverVersion = SemverVersion :: new ( 66 , 0 , 0 ) ;
21
21
22
22
/// List of all past database schema versions, in *reverse* order
23
23
///
@@ -29,6 +29,7 @@ static KNOWN_VERSIONS: Lazy<Vec<KnownVersion>> = Lazy::new(|| {
29
29
// | leaving the first copy as an example for the next person.
30
30
// v
31
31
// KnownVersion::new(next_int, "unique-dirname-with-the-sql-files"),
32
+ KnownVersion :: new( 66 , "add-instance-updater-lock" ) ,
32
33
KnownVersion :: new( 65 , "region-replacement" ) ,
33
34
KnownVersion :: new( 64 , "add-view-for-v2p-mappings" ) ,
34
35
KnownVersion :: new( 63 , "remove-producer-base-route-column" ) ,
Original file line number Diff line number Diff line change
1
+ ALTER TABLE omicron .public .instance
2
+ ADD COLUMN IF NOT EXISTS updater_id UUID
3
+ DEFAULT null ,
4
+ ADD COLUMN IF NOT EXISTS updater_gen INT
5
+ NOT NULL DEFAULT 0 ;
Original file line number Diff line number Diff line change @@ -1007,7 +1007,15 @@ CREATE TABLE IF NOT EXISTS omicron.public.instance (
1007
1007
ncpus INT NOT NULL ,
1008
1008
memory INT NOT NULL ,
1009
1009
hostname STRING(63 ) NOT NULL ,
1010
- boot_on_fault BOOL NOT NULL DEFAULT false
1010
+ boot_on_fault BOOL NOT NULL DEFAULT false,
1011
+
1012
+ /* ID of the instance update saga that has locked this instance for
1013
+ * updating, if one exists. */
1014
+ updater_id UUID,
1015
+
1016
+ /* Generation of the instance updater lock */
1017
+ updater_gen INT NOT NULL
1018
+
1011
1019
);
1012
1020
1013
1021
-- Names for instances within a project should be unique
You can’t perform that action at this time.
0 commit comments