Revise PR based on review

This commit is contained in:
Tuan Dang
2025-05-12 12:56:56 -07:00
parent 531607dcb7
commit e8519f6612
14 changed files with 100 additions and 51 deletions
@@ -10,8 +10,8 @@ export async function up(knex: Knex): Promise<void> {
t.timestamps(true, true, true);
t.string("projectId").notNullable();
t.foreign("projectId").references("id").inTable(TableName.Project).onDelete("CASCADE");
t.uuid("caId").notNullable();
t.foreign("caId").references("id").inTable(TableName.CertificateAuthority).onDelete("CASCADE");
t.uuid("caId").nullable();
t.foreign("caId").references("id").inTable(TableName.CertificateAuthority).onDelete("SET NULL");
t.string("name").notNullable();
t.string("commonName").notNullable();
t.specificType("subjectAlternativeNames", "text[]").notNullable();
+1 -1
View File
@@ -12,7 +12,7 @@ export const PkiSubscribersSchema = z.object({
createdAt: z.date(),
updatedAt: z.date(),
projectId: z.string(),
caId: z.string().uuid(),
caId: z.string().uuid().nullable().optional(),
name: z.string(),
commonName: z.string(),
subjectAlternativeNames: z.string().array(),