@balena/open-balena-api 31.2.2-build-backfill-service-device-on-dsev-f852eb7a854ea5f37659b9e8c93a7a16ca0b6e9c-1 → 31.2.3-build-make-fks-not-nullable-201f928d5b6dc0793d5121ccf3e37cd091f1dbb6-1

Sign up to get free protection for your applications and to get access to all the features.
@@ -941,10 +941,10 @@ export interface DeviceServiceEnvironmentVariable {
941
941
  value: Types['Text']['Read'];
942
942
  service: {
943
943
  __id: Service['Read']['id'];
944
- } | [Service['Read']] | [] | null;
944
+ } | [Service['Read']];
945
945
  device: {
946
946
  __id: Device['Read']['id'];
947
- } | [Device['Read']] | [] | null;
947
+ } | [Device['Read']];
948
948
  device__installs__application__has__service_name: {
949
949
  __id: ServiceInstall['Read']['id'];
950
950
  } | [ServiceInstall['Read']];
@@ -953,7 +953,7 @@ export interface DeviceServiceEnvironmentVariable {
953
953
  } | [ServiceInstall['Read']];
954
954
  application__has__service_name: {
955
955
  __id: Service['Read']['id'];
956
- } | [Service['Read']] | [] | null;
956
+ } | [Service['Read']];
957
957
  };
958
958
  Write: {
959
959
  created_at: Types['Date Time']['Write'];
@@ -962,8 +962,8 @@ export interface DeviceServiceEnvironmentVariable {
962
962
  name: Types['Short Text']['Write'];
963
963
  id: Types['Serial']['Write'];
964
964
  value: Types['Text']['Write'];
965
- service: Service['Write']['id'] | null;
966
- device: Device['Write']['id'] | null;
965
+ service: Service['Write']['id'];
966
+ device: Device['Write']['id'];
967
967
  };
968
968
  }
969
969
  export interface DeviceTag {
package/dist/balena.sbvr CHANGED
@@ -813,9 +813,9 @@ Fact type: image environment variable has value
813
813
  Fact type: device service environment variable has value
814
814
  Necessity: each device service environment variable has exactly one value.
815
815
  Fact type: device service environment variable has service
816
- Necessity: each device service environment variable has at most one service.
816
+ Necessity: each device service environment variable has exactly one service.
817
817
  Fact type: device service environment variable has device
818
- Necessity: each device service environment variable has at most one device.
818
+ Necessity: each device service environment variable has exactly one device.
819
819
 
820
820
 
821
821
  -- application tag
@@ -438,10 +438,10 @@ declare const getDevice: (req: import("@balena/pinejs/out/sbvr-api/permissions.j
438
438
  value: import("@balena/sbvr-types").Types["Text"]["Read"];
439
439
  service: {
440
440
  __id: import("../../../balena-model.js").Service["Read"]["id"];
441
- } | [import("../../../balena-model.js").Service["Read"]] | [] | null;
441
+ } | [import("../../../balena-model.js").Service["Read"]];
442
442
  device: {
443
443
  __id: import("../../../balena-model.js").Device["Read"]["id"];
444
- } | [import("../../../balena-model.js").Device["Read"]] | [] | null;
444
+ } | [import("../../../balena-model.js").Device["Read"]];
445
445
  device__installs__application__has__service_name: {
446
446
  __id: import("../../../balena-model.js").ServiceInstall["Read"]["id"];
447
447
  } | [import("../../../balena-model.js").ServiceInstall["Read"]];
@@ -450,7 +450,7 @@ declare const getDevice: (req: import("@balena/pinejs/out/sbvr-api/permissions.j
450
450
  } | [import("../../../balena-model.js").ServiceInstall["Read"]];
451
451
  application__has__service_name: {
452
452
  __id: import("../../../balena-model.js").Service["Read"]["id"];
453
- } | [import("../../../balena-model.js").Service["Read"]] | [] | null;
453
+ } | [import("../../../balena-model.js").Service["Read"]];
454
454
  }, "name" | "value">[];
455
455
  })[];
456
456
  readonly belongs_to__application: (import("@balena/abstract-sql-to-typescript").PickDeferred<{
@@ -28,7 +28,7 @@ const migration = {
28
28
  delayMS: 60000,
29
29
  backoffDelayMS: 120000,
30
30
  errorThreshold: 10,
31
- finalize: false,
31
+ finalize: true,
32
32
  };
33
33
  export default migration;
34
34
  //# sourceMappingURL=00097-backfill-device-service-on-device-service-environment-variable.async.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"00097-backfill-device-service-on-device-service-environment-variable.async.js","sourceRoot":"","sources":["../../src/migrations/00097-backfill-device-service-on-device-service-environment-variable.async.ts"],"names":[],"mappings":"AAEA,MAAM,SAAS,GAA4B;IAC1C,QAAQ,EAAE;;;;;;;;;;;;;;EAcT;IACD,OAAO,EAAE;;;;;;;;;EASR;IACD,cAAc,EAAE,IAAI;IACpB,OAAO,EAAE,KAAK;IACd,cAAc,EAAE,MAAM;IACtB,cAAc,EAAE,EAAE;IAClB,QAAQ,EAAE,KAAK;CACf,CAAC;AAEF,eAAe,SAAS,CAAC"}
1
+ {"version":3,"file":"00097-backfill-device-service-on-device-service-environment-variable.async.js","sourceRoot":"","sources":["../../src/migrations/00097-backfill-device-service-on-device-service-environment-variable.async.ts"],"names":[],"mappings":"AAEA,MAAM,SAAS,GAA4B;IAC1C,QAAQ,EAAE;;;;;;;;;;;;;;EAcT;IACD,OAAO,EAAE;;;;;;;;;EASR;IACD,cAAc,EAAE,IAAI;IACpB,OAAO,EAAE,KAAK;IACd,cAAc,EAAE,MAAM;IACtB,cAAc,EAAE,EAAE;IAClB,QAAQ,EAAE,IAAI;CACd,CAAC;AAEF,eAAe,SAAS,CAAC"}
@@ -0,0 +1,5 @@
1
+ ALTER TABLE "device service environment variable"
2
+ ALTER COLUMN "service" SET NOT NULL;
3
+
4
+ ALTER TABLE "device service environment variable"
5
+ ALTER COLUMN "device" SET NOT NULL;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@balena/open-balena-api",
3
3
  "description": "Internet of things, Made Simple",
4
- "version": "31.2.2-build-backfill-service-device-on-dsev-f852eb7a854ea5f37659b9e8c93a7a16ca0b6e9c-1",
4
+ "version": "31.2.3-build-make-fks-not-nullable-201f928d5b6dc0793d5121ccf3e37cd091f1dbb6-1",
5
5
  "license": "AGPL-3.0",
6
6
  "repository": {
7
7
  "type": "git",
@@ -166,6 +166,6 @@
166
166
  "loader": "ts-node/esm/transpile-only"
167
167
  },
168
168
  "versionist": {
169
- "publishedAt": "2024-11-18T14:59:30.700Z"
169
+ "publishedAt": "2024-11-18T15:16:38.321Z"
170
170
  }
171
171
  }