diff --git a/apps/dokploy/components/dashboard/project/add-database.tsx b/apps/dokploy/components/dashboard/project/add-database.tsx index 7db399e96..c56b1c179 100644 --- a/apps/dokploy/components/dashboard/project/add-database.tsx +++ b/apps/dokploy/components/dashboard/project/add-database.tsx @@ -80,9 +80,7 @@ const baseDatabaseSchema = z.object({ databasePassword: z.string(), dockerImage: z.string(), description: z.string().nullable(), - serverId: z.string().min(1, { - message: "Server is required", - }), + serverId: z.string().nullable(), }); const mySchema = z.discriminatedUnion("type", [ @@ -174,6 +172,7 @@ export const AddDatabase = ({ projectId, projectName }: Props) => { description: "", databaseName: "", databaseUser: "", + serverId: null, }, resolver: zodResolver(mySchema), }); @@ -222,6 +221,7 @@ export const AddDatabase = ({ projectId, projectName }: Props) => { promise = redisMutation.mutateAsync({ ...commonParams, databasePassword: data.databasePassword, + serverId: data.serverId, projectId, }); } else if (data.type === "mariadb") { @@ -379,7 +379,7 @@ export const AddDatabase = ({ projectId, projectName }: Props) => { Select a Server + + + + + )} + /> + + ( + + Description + +