File tree 2 files changed +9
-4
lines changed
2 files changed +9
-4
lines changed Original file line number Diff line number Diff line change 2
2
// License, v. 2.0. If a copy of the MPL was not distributed with this
3
3
// file, You can obtain one at https://mozilla.org/MPL/5.0/.
4
4
5
- // Copyright 2024 Oxide Computer Company
5
+ // Copyright 2025 Oxide Computer Company
6
6
7
7
//! Database representation of affinity and anti-affinity groups
8
8
Original file line number Diff line number Diff line change @@ -245,10 +245,15 @@ CREATE TABLE IF NOT EXISTS omicron.public.sled_resource (
245
245
kind omicron .public .sled_resource_kind NOT NULL ,
246
246
247
247
-- The UUID of an instance, if this resource belongs to an instance.
248
+ --
249
+ -- This should eventually become NOT NULL for all instances, but is
250
+ -- still nullable for backwards compatibility purposes. Specifically,
251
+ -- the "instance start" saga can create rows in this table before creating
252
+ -- rows for "omicron.public.vmm", which we would use for back-filling.
253
+ -- If we tried to backfill + make this column non-nullable while that saga
254
+ -- was mid-execution, we would still have some rows in this table with nullable
255
+ -- values that would be more complex to fix.
248
256
instance_id UUID
249
-
250
- -- TODO Add constraint that if kind is instance, instance_id is not NULL?
251
- -- Or will that break backwards compatibility?
252
257
);
253
258
254
259
-- Allow looking up all resources which reside on a sled
You can’t perform that action at this time.
0 commit comments