@balena/open-balena-api 38.0.0-build-Limit-size-ofl-arge-fields-3a101838568f7ce669c484581668e2e59fbeb045-1 → 38.0.0-build-Limit-size-ofl-arge-fields-62547feedf1c82c3d179b80e451cbc75499ec14f-1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -191,19 +191,46 @@ ON "application" ("slug" varchar_pattern_ops, "is public", "is host");
191
191
  CREATE INDEX IF NOT EXISTS "scheduled_job_run_start_timestamp_idx"
192
192
  ON "scheduled job run" (DATE_TRUNC('milliseconds', "start timestamp"));
193
193
 
194
- ALTER TABLE "user"
195
- -- It is necessary that each user (Auth) that has an email, has an email that has a Length (Type) that is greater than 4.
196
- ADD CONSTRAINT "user$M+9koFfMHn7kQFDNBaQZbS7gAvNMB1QkrTtsaVZoETw=" CHECK (NOT (
194
+ ALTER TABLE "api key"
195
+ -- It is necessary that each api key that has a name, has a name that has a Length (Type) that is less than or equal to 1564.
196
+ ADD CONSTRAINT "api key$D14eZaZBafMEz7iBkiFFzvWJrzbdLPx8lH0CuwnDJhQ=" CHECK (NOT (
197
+ "name" IS NOT NULL
198
+ AND NOT (
199
+ LENGTH("name") <= 1564
200
+ AND LENGTH("name") IS NOT NULL
201
+ AND "name" IS NOT NULL
202
+ )
203
+ )),
204
+ -- It is necessary that each api key that has a description, has a description that has a Length (Type) that is less than or equal to 1244.
205
+ ADD CONSTRAINT "api key$WIi1hzHsE7BNiWt0Mu65TeJLI+msputiiPog1eFUDC4=" CHECK (NOT (
206
+ "description" IS NOT NULL
207
+ AND NOT (
208
+ LENGTH("description") <= 1244
209
+ AND LENGTH("description") IS NOT NULL
210
+ AND "description" IS NOT NULL
211
+ )
212
+ ));
213
+
214
+ ALTER TABLE "user"
215
+ -- It is necessary that Each user has a username that has a Length (Type) that is less than or equal to 73.
216
+ ADD CONSTRAINT "user$X4wTdmwFnA5OK/O8sut0Idrym4db2iVYraIIJSST5GY=" CHECK (LENGTH("username") <= 73
217
+ AND LENGTH("username") IS NOT NULL
218
+ AND "username" IS NOT NULL);
219
+
220
+ ALTER TABLE "user"
221
+ -- It is necessary that each email is of exactly one user (Auth).
222
+ ADD UNIQUE ("email"),
223
+ -- It is necessary that each user (Auth) that has an email, has an email that has a Length (Type) that is greater than 4 and is less than or equal to 254.
224
+ ADD CONSTRAINT "user$d5eBtWZrArLycRLjuBoVdWS/P4w6MdcM5lTjNKTcxQ4=" CHECK (NOT (
197
225
  "email" IS NOT NULL
198
226
  AND NOT (
199
227
  4 < LENGTH("email")
228
+ AND LENGTH("email") <= 254
200
229
  AND LENGTH("email") IS NOT NULL
201
230
  AND "email" IS NOT NULL
202
231
  )
203
232
  ));
204
233
 
205
- ALTER TABLE "user" ADD UNIQUE ("email");
206
-
207
234
  -- This is here temporarily due to a change on the sbvr for device service environment variable
208
235
  -- in order to keep the database schema in sync with the sbvr
209
236
  -- and will be removed once we drop the service install column
@@ -78,8 +78,6 @@ BEGIN
78
78
  );
79
79
  END IF;
80
80
 
81
- ALTER TABLE "application tag" DROP CONSTRAINT IF EXISTS "application tag$dwaIlc8ofrxW9EuuGVg2l/mONXLOEwBOKBKuMMh0y84=";
82
-
83
81
  IF NOT EXISTS (
84
82
  SELECT 1
85
83
  FROM information_schema.table_constraints tc
@@ -262,8 +260,6 @@ BEGIN
262
260
  );
263
261
  END IF;
264
262
 
265
- ALTER TABLE "device tag" DROP CONSTRAINT IF EXISTS "device tag$LxFNw830+UStHqiMds2etP37dS5mqJP1LWfVi6p8xO0=";
266
-
267
263
  IF NOT EXISTS (
268
264
  SELECT 1
269
265
  FROM information_schema.table_constraints tc
@@ -472,10 +468,6 @@ BEGIN
472
468
  );
473
469
  END IF;
474
470
 
475
- ALTER TABLE "organization" DROP CONSTRAINT IF EXISTS "organization$/jm+9cFLOktW7UDAih9SkCWgaZxrnJBTAFjsx8Lrc7A=";
476
-
477
- ALTER TABLE "organization" DROP CONSTRAINT IF EXISTS "organization$E+cBryACQrrUVLO1vZD8cqyxwba+nOu+T7UYno7mUZ0=";
478
-
479
471
  IF NOT EXISTS (
480
472
  SELECT 1
481
473
  FROM information_schema.table_constraints tc
@@ -502,8 +494,6 @@ BEGIN
502
494
  );
503
495
  END IF;
504
496
 
505
- ALTER TABLE "release tag" DROP CONSTRAINT IF EXISTS "release tag$NvLy4YiKcvnAIsymFg0q5h0woCgrL3NW7FzZLrc6S9E=";
506
-
507
497
  IF NOT EXISTS (
508
498
  SELECT 1
509
499
  FROM information_schema.table_constraints tc
@@ -530,6 +520,19 @@ BEGIN
530
520
  );
531
521
  END IF;
532
522
 
523
+ IF NOT EXISTS (
524
+ SELECT 1
525
+ FROM information_schema.table_constraints tc
526
+ WHERE tc.CONSTRAINT_TYPE = 'CHECK'
527
+ AND tc.table_schema = CURRENT_SCHEMA()
528
+ AND tc.table_name = 'release'
529
+ AND tc.constraint_name = 'release$L91n+PaXJQjvKeXDm++JCGcLpF4n/xFkKpkDF5Ii8HA='
530
+ ) THEN
531
+ ALTER TABLE "release" ADD CONSTRAINT "release$L91n+PaXJQjvKeXDm++JCGcLpF4n/xFkKpkDF5Ii8HA=" CHECK (
532
+ (NOT (("invalidation reason" IS NOT NULL) AND (NOT ((LENGTH("invalidation reason") <= 255) AND (LENGTH("invalidation reason") IS NOT NULL) AND ("invalidation reason" IS NOT NULL)))))
533
+ );
534
+ END IF;
535
+
533
536
  IF NOT EXISTS (
534
537
  SELECT 1
535
538
  FROM information_schema.table_constraints tc
@@ -634,8 +637,6 @@ BEGIN
634
637
  );
635
638
  END IF;
636
639
 
637
- ALTER TABLE "service instance" DROP CONSTRAINT IF EXISTS "service instance$XlBWF+ef6mHIb+iS9NnT08mmd9+MyFk1+aT9vPjHehg=";
638
-
639
640
  IF NOT EXISTS (
640
641
  SELECT 1
641
642
  FROM information_schema.table_constraints tc
@@ -688,8 +689,6 @@ BEGIN
688
689
  );
689
690
  END IF;
690
691
 
691
- ALTER TABLE "user" DROP CONSTRAINT IF EXISTS "user$M+9koFfMHn7kQFDNBaQZbS7gAvNMB1QkrTtsaVZoETw=";
692
-
693
692
  IF NOT EXISTS (
694
693
  SELECT 1
695
694
  FROM information_schema.table_constraints tc
@@ -715,5 +714,13 @@ BEGIN
715
714
  ((LENGTH("title") <= 120) AND (LENGTH("title") IS NOT NULL) AND ("title" IS NOT NULL))
716
715
  );
717
716
  END IF;
717
+
718
+ ALTER TABLE "application tag" DROP CONSTRAINT IF EXISTS "application tag$dwaIlc8ofrxW9EuuGVg2l/mONXLOEwBOKBKuMMh0y84=";
719
+ ALTER TABLE "device tag" DROP CONSTRAINT IF EXISTS "device tag$LxFNw830+UStHqiMds2etP37dS5mqJP1LWfVi6p8xO0=";
720
+ ALTER TABLE "organization" DROP CONSTRAINT IF EXISTS "organization$E+cBryACQrrUVLO1vZD8cqyxwba+nOu+T7UYno7mUZ0=";
721
+ ALTER TABLE "organization" DROP CONSTRAINT IF EXISTS "organization$/jm+9cFLOktW7UDAih9SkCWgaZxrnJBTAFjsx8Lrc7A=";
722
+ ALTER TABLE "release tag" DROP CONSTRAINT IF EXISTS "release tag$NvLy4YiKcvnAIsymFg0q5h0woCgrL3NW7FzZLrc6S9E=";
723
+ ALTER TABLE "service instance" DROP CONSTRAINT IF EXISTS "service instance$XlBWF+ef6mHIb+iS9NnT08mmd9+MyFk1+aT9vPjHehg=";
724
+ ALTER TABLE "user" DROP CONSTRAINT IF EXISTS "user$M+9koFfMHn7kQFDNBaQZbS7gAvNMB1QkrTtsaVZoETw=";
718
725
  END;
719
726
  $$;
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": "38.0.0-build-Limit-size-ofl-arge-fields-3a101838568f7ce669c484581668e2e59fbeb045-1",
4
+ "version": "38.0.0-build-Limit-size-ofl-arge-fields-62547feedf1c82c3d179b80e451cbc75499ec14f-1",
5
5
  "license": "AGPL-3.0",
6
6
  "repository": {
7
7
  "type": "git",
@@ -174,6 +174,6 @@
174
174
  "import": "@swc-node/register/esm-register"
175
175
  },
176
176
  "versionist": {
177
- "publishedAt": "2025-06-27T14:53:39.307Z"
177
+ "publishedAt": "2025-06-30T10:47:56.812Z"
178
178
  }
179
179
  }