mirror of
https://github.com/awatertrevi/infisical.git
synced 2026-10-06 07:26:45 +00:00
increase name sizes
This commit is contained in:
@@ -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
|
||||||
|
}
|
||||||
@@ -9,7 +9,7 @@ interface SlugSchemaInputs {
|
|||||||
field?: string;
|
field?: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
export const slugSchema = ({ min = 1, max = 32, field = "Slug" }: SlugSchemaInputs = {}) => {
|
export const slugSchema = ({ min = 1, max = 64, field = "Slug" }: SlugSchemaInputs = {}) => {
|
||||||
return z
|
return z
|
||||||
.string()
|
.string()
|
||||||
.trim()
|
.trim()
|
||||||
|
|||||||
+1
-1
@@ -32,7 +32,7 @@ const formSchema = z.object({
|
|||||||
environments: z
|
environments: z
|
||||||
.object({
|
.object({
|
||||||
name: z.string().trim().min(1),
|
name: z.string().trim().min(1),
|
||||||
slug: slugSchema({ min: 1, max: 32 })
|
slug: slugSchema({ min: 1, max: 64 })
|
||||||
})
|
})
|
||||||
.array()
|
.array()
|
||||||
.nullish()
|
.nullish()
|
||||||
|
|||||||
+1
-1
@@ -21,7 +21,7 @@ import {
|
|||||||
import { slugSchema } from "@app/lib/schemas";
|
import { slugSchema } from "@app/lib/schemas";
|
||||||
|
|
||||||
const formSchema = z.object({
|
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()
|
description: z.string().max(500).optional()
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
@@ -7,7 +7,7 @@ interface SlugSchemaInputs {
|
|||||||
field?: string;
|
field?: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
export const slugSchema = ({ min = 1, max = 32, field = "Slug" }: SlugSchemaInputs = {}) => {
|
export const slugSchema = ({ min = 1, max = 64, field = "Slug" }: SlugSchemaInputs = {}) => {
|
||||||
return z
|
return z
|
||||||
.string()
|
.string()
|
||||||
.trim()
|
.trim()
|
||||||
|
|||||||
+1
-1
@@ -5,7 +5,7 @@ import { FormControl, Input, TextArea } from "@app/components/v2";
|
|||||||
import { slugSchema } from "@app/lib/schemas";
|
import { slugSchema } from "@app/lib/schemas";
|
||||||
|
|
||||||
export const genericAppConnectionFieldsSchema = z.object({
|
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()
|
description: z.string().trim().max(256, "Description cannot exceed 256 characters").nullish()
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user