Skip to content

Commit e3f3426

Browse files
committed
refactor: remove redundant password requirement validation from database schemas, improving consistency across database configurations
1 parent a09cd06 commit e3f3426

File tree

5 files changed

+0
-9
lines changed

5 files changed

+0
-9
lines changed

apps/dokploy/components/dashboard/project/add-database.tsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,6 @@ const baseDatabaseSchema = z.object({
8585
}),
8686
databasePassword: z
8787
.string()
88-
.min(1, "Password is required")
8988
.regex(/^[a-zA-Z0-9@#%^&*()_+\-=[\]{}|;:,.<>?~`]*$/, {
9089
message:
9190
"Password contains invalid characters. Please avoid: $ ! ' \" \\ / and space characters for database compatibility",

packages/server/src/db/schema/mariadb.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ import { z } from "zod";
66
import { backups } from "./backups";
77
import { environments } from "./environment";
88
import { mounts } from "./mount";
9-
import { projects } from "./project";
109
import { server } from "./server";
1110
import {
1211
applicationStatus,
@@ -98,7 +97,6 @@ const createSchema = createInsertSchema(mariadb, {
9897
databaseUser: z.string().min(1),
9998
databasePassword: z
10099
.string()
101-
.min(1, "Password is required")
102100
.regex(/^[a-zA-Z0-9@#%^&*()_+\-=[\]{}|;:,.<>?~`]*$/, {
103101
message:
104102
"Password contains invalid characters. Please avoid: $ ! ' \" \\ / and space characters for database compatibility",

packages/server/src/db/schema/mongo.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ import { z } from "zod";
66
import { backups } from "./backups";
77
import { environments } from "./environment";
88
import { mounts } from "./mount";
9-
import { projects } from "./project";
109
import { server } from "./server";
1110
import {
1211
applicationStatus,
@@ -93,7 +92,6 @@ const createSchema = createInsertSchema(mongo, {
9392
name: z.string().min(1),
9493
databasePassword: z
9594
.string()
96-
.min(1, "Password is required")
9795
.regex(/^[a-zA-Z0-9@#%^&*()_+\-=[\]{}|;:,.<>?~`]*$/, {
9896
message:
9997
"Password contains invalid characters. Please avoid: $ ! ' \" \\ / and space characters for database compatibility",

packages/server/src/db/schema/mysql.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ import { z } from "zod";
66
import { backups } from "./backups";
77
import { environments } from "./environment";
88
import { mounts } from "./mount";
9-
import { projects } from "./project";
109
import { server } from "./server";
1110
import {
1211
applicationStatus,
@@ -96,7 +95,6 @@ const createSchema = createInsertSchema(mysql, {
9695
databaseUser: z.string().min(1),
9796
databasePassword: z
9897
.string()
99-
.min(1, "Password is required")
10098
.regex(/^[a-zA-Z0-9@#%^&*()_+\-=[\]{}|;:,.<>?~`]*$/, {
10199
message:
102100
"Password contains invalid characters. Please avoid: $ ! ' \" \\ / and space characters for database compatibility",

packages/server/src/db/schema/postgres.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ import { z } from "zod";
66
import { backups } from "./backups";
77
import { environments } from "./environment";
88
import { mounts } from "./mount";
9-
import { projects } from "./project";
109
import { server } from "./server";
1110
import {
1211
applicationStatus,
@@ -92,7 +91,6 @@ const createSchema = createInsertSchema(postgres, {
9291
name: z.string().min(1),
9392
databasePassword: z
9493
.string()
95-
.min(1, "Password is required")
9694
.regex(/^[a-zA-Z0-9@#%^&*()_+\-=[\]{}|;:,.<>?~`]*$/, {
9795
message:
9896
"Password contains invalid characters. Please avoid: $ ! ' \" \\ / and space characters for database compatibility",

0 commit comments

Comments
 (0)