From 806e11a5b21d2538f0dbc2c33b386738c4a1f584 Mon Sep 17 00:00:00 2001 From: Fang-Pen Lin Date: Tue, 28 Oct 2025 11:09:49 -0700 Subject: [PATCH] Make column not nullable --- backend/bdd/features/steps/pki_acme.py | 2 +- backend/src/db/migrations/20251027234547_add-pki-acme.ts | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/backend/bdd/features/steps/pki_acme.py b/backend/bdd/features/steps/pki_acme.py index 9a84b0dc8..0f04849e6 100644 --- a/backend/bdd/features/steps/pki_acme.py +++ b/backend/bdd/features/steps/pki_acme.py @@ -36,7 +36,7 @@ def step_impl(context: Context, profile_var: str): # TODO: Fixed value for now, just to make test much easier, # we should call infisical API to create such profile instead # in the future - profile_id = "c051e74c-48a7-4724-832c-d5b496698546" + profile_id = "40dd4794-66e3-4bd3-9875-c1f819804bb2" context.vars[profile_var] = AcmeProfile(profile_id) diff --git a/backend/src/db/migrations/20251027234547_add-pki-acme.ts b/backend/src/db/migrations/20251027234547_add-pki-acme.ts index a81b377e3..a2e1ab777 100644 --- a/backend/src/db/migrations/20251027234547_add-pki-acme.ts +++ b/backend/src/db/migrations/20251027234547_add-pki-acme.ts @@ -35,7 +35,10 @@ export async function up(knex: Knex): Promise { if (await knex.schema.hasColumn(TableName.PkiCertificateProfile, "enrollmentType")) { // Notice: it's okay to use `.checkIn(...).alter();` here because the constraint name is all lowercase. await knex.schema.alterTable(TableName.PkiCertificateProfile, (t) => { - t.string("enrollmentType").checkIn(["api", "est", "acme"], NEW_ENROLLMENT_TYPE_CHECK_CONSTRAINT).alter(); + t.string("enrollmentType") + .notNullable() + .checkIn(["api", "est", "acme"], NEW_ENROLLMENT_TYPE_CHECK_CONSTRAINT) + .alter(); }); }