Skip to content

Infisical is the open-source platform for securing secrets, certificates, access, and AI Agents.

increase name sizes

x03220538bf5e8b1d7d
diff --git a/backend/src/db/migrations/20250521061831_increase-name-sizes.ts b/backend/src/db/migrations/20250521061831_increase-name-sizes.ts
new file mode 100644
index 0000000000..b872793394
--- /dev/null
+++ b/backend/src/db/migrations/20250521061831_increase-name-sizes.ts
@@ -0,0 +1,22 @@
+import { Knex } from "knex";
+
+import { TableName } from "../schemas";
+
+export async function up(knex: Knex): Promise<void> {
+ await knex.schema.alterTable(TableName.SecretSync, (t) => {
+ t.string("name", 64).notNullable().alter();
+ });
+ await knex.schema.alterTable(TableName.ProjectTemplates, (t) => {
+ t.string("name", 64).notNullable().alter();
+ });
+ await knex.schema.alterTable(TableName.AppConnection, (t) => {
+ t.string("name", 64).notNullable().alter();
+ });
+ await knex.schema.alterTable(TableName.SecretRotationV2, (t) => {
+ t.string("name", 64).notNullable().alter();
+ });
+}
+
+export async function down(): Promise<void> {
+ // No down migration or it will error
+}
diff --git a/backend/src/server/lib/schemas.ts b/backend/src/server/lib/schemas.ts
index 9f93eaea0d..00651d2cc4 100644
--- a/backend/src/server/lib/schemas.ts
+++ b/backend/src/server/lib/schemas.ts
@@ -9,7 +9,7 @@ interface SlugSchemaInputs {
field?: string;
}
-export const slugSchema = ({ min = 1, max = 32, field = "Slug" }: SlugSchemaInputs = {}) => {
+export const slugSchema = ({ min = 1, max = 64, field = "Slug" }: SlugSchemaInputs = {}) => {
return z
.string()
.trim()
diff --git a/frontend/src/components/projects/ProjectSettings/components/ProjectTemplatesTab/components/EditProjectTemplateSection/components/ProjectTemplateEnvironmentsForm.tsx b/frontend/src/components/projects/ProjectSettings/components/ProjectTemplatesTab/components/EditProjectTemplateSection/components/ProjectTemplateEnvironmentsForm.tsx
index ef2691d694..3d54bbb201 100644
--- a/frontend/src/components/projects/ProjectSettings/components/ProjectTemplatesTab/components/EditProjectTemplateSection/components/ProjectTemplateEnvironmentsForm.tsx
+++ b/frontend/src/components/projects/ProjectSettings/components/ProjectTemplatesTab/components/EditProjectTemplateSection/components/ProjectTemplateEnvironmentsForm.tsx
@@ -32,7 +32,7 @@ const formSchema = z.object({
environments: z
.object({
name: z.string().trim().min(1),
- slug: slugSchema({ min: 1, max: 32 })
+ slug: slugSchema({ min: 1, max: 64 })
})
.array()
.nullish()
diff --git a/frontend/src/components/projects/ProjectSettings/components/ProjectTemplatesTab/components/ProjectTemplateDetailsModal.tsx b/frontend/src/components/projects/ProjectSettings/components/ProjectTemplatesTab/components/ProjectTemplateDetailsModal.tsx
index 5b5728dac8..216253653a 100644
--- a/frontend/src/components/projects/ProjectSettings/components/ProjectTemplatesTab/components/ProjectTemplateDetailsModal.tsx
+++ b/frontend/src/components/projects/ProjectSettings/components/ProjectTemplatesTab/components/ProjectTemplateDetailsModal.tsx
@@ -21,7 +21,7 @@ import {
import { slugSchema } from "@app/lib/schemas";
const formSchema = z.object({
- name: slugSchema({ min: 1, max: 32, field: "Name" }),
+ name: slugSchema({ min: 1, max: 64, field: "Name" }),
description: z.string().max(500).optional()
});
diff --git a/frontend/src/lib/schemas/slugSchema.ts b/frontend/src/lib/schemas/slugSchema.ts
index ed97cb7d0f..5a02c6a286 100644
--- a/frontend/src/lib/schemas/slugSchema.ts
+++ b/frontend/src/lib/schemas/slugSchema.ts
@@ -7,7 +7,7 @@ interface SlugSchemaInputs {
field?: string;
}
-export const slugSchema = ({ min = 1, max = 32, field = "Slug" }: SlugSchemaInputs = {}) => {
+export const slugSchema = ({ min = 1, max = 64, field = "Slug" }: SlugSchemaInputs = {}) => {
return z
.string()
.trim()
diff --git a/frontend/src/pages/organization/AppConnections/AppConnectionsPage/components/AppConnectionForm/GenericAppConnectionFields.tsx b/frontend/src/pages/organization/AppConnections/AppConnectionsPage/components/AppConnectionForm/GenericAppConnectionFields.tsx
index 19df1f4ac3..70128025d3 100644
--- a/frontend/src/pages/organization/AppConnections/AppConnectionsPage/components/AppConnectionForm/GenericAppConnectionFields.tsx
+++ b/frontend/src/pages/organization/AppConnections/AppConnectionsPage/components/AppConnectionForm/GenericAppConnectionFields.tsx
@@ -5,7 +5,7 @@ import { FormControl, Input, TextArea } from "@app/components/v2";
import { slugSchema } from "@app/lib/schemas";
export const genericAppConnectionFieldsSchema = z.object({
- name: slugSchema({ min: 1, max: 32, field: "Name" }),
+ name: slugSchema({ min: 1, max: 64, field: "Name" }),
description: z.string().trim().max(256, "Description cannot exceed 256 characters").nullish()
});