|
|
@ -12,7 +12,6 @@ export interface ProjectCreateForm { |
|
|
|
password: string |
|
|
|
password: string |
|
|
|
port: number | string |
|
|
|
port: number | string |
|
|
|
ssl?: Record<string, string> |
|
|
|
ssl?: Record<string, string> |
|
|
|
searchPath?: string[] |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
| { |
|
|
|
| { |
|
|
|
client?: ClientType.SQLITE |
|
|
|
client?: ClientType.SQLITE |
|
|
@ -22,6 +21,7 @@ export interface ProjectCreateForm { |
|
|
|
} |
|
|
|
} |
|
|
|
useNullAsDefault?: boolean |
|
|
|
useNullAsDefault?: boolean |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
searchPath?: string[] |
|
|
|
} |
|
|
|
} |
|
|
|
inflection: { |
|
|
|
inflection: { |
|
|
|
inflectionColumn?: string |
|
|
|
inflectionColumn?: string |
|
|
@ -73,7 +73,6 @@ const sampleConnectionData: Record<ClientType | string, ProjectCreateForm['dataS |
|
|
|
user: 'postgres', |
|
|
|
user: 'postgres', |
|
|
|
password: 'password', |
|
|
|
password: 'password', |
|
|
|
database: '_test', |
|
|
|
database: '_test', |
|
|
|
searchPath: ['public'], |
|
|
|
|
|
|
|
ssl: { |
|
|
|
ssl: { |
|
|
|
ca: '', |
|
|
|
ca: '', |
|
|
|
key: '', |
|
|
|
key: '', |
|
|
@ -110,7 +109,6 @@ const sampleConnectionData: Record<ClientType | string, ProjectCreateForm['dataS |
|
|
|
user: 'sa', |
|
|
|
user: 'sa', |
|
|
|
password: 'Password123.', |
|
|
|
password: 'Password123.', |
|
|
|
database: '_test', |
|
|
|
database: '_test', |
|
|
|
searchPath: ['dbo'], |
|
|
|
|
|
|
|
ssl: { |
|
|
|
ssl: { |
|
|
|
ca: '', |
|
|
|
ca: '', |
|
|
|
key: '', |
|
|
|
key: '', |
|
|
@ -203,6 +201,11 @@ export const getDefaultConnectionConfig = (client: ClientType): ProjectCreateFor |
|
|
|
return { |
|
|
|
return { |
|
|
|
client, |
|
|
|
client, |
|
|
|
connection: sampleConnectionData[client], |
|
|
|
connection: sampleConnectionData[client], |
|
|
|
|
|
|
|
searchPath: [ClientType.PG, ClientType.MSSQL].includes(client) |
|
|
|
|
|
|
|
? client === ClientType.PG |
|
|
|
|
|
|
|
? ['public'] |
|
|
|
|
|
|
|
: ['dbo'] |
|
|
|
|
|
|
|
: undefined, |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|