File tree Expand file tree Collapse file tree 1 file changed +12
-7
lines changed Expand file tree Collapse file tree 1 file changed +12
-7
lines changed Original file line number Diff line number Diff line change @@ -31,18 +31,23 @@ export abstract class BaseSequelize {
31
31
32
32
if ( config . validateOnly ) {
33
33
34
- return Object . assign ( { } , config , {
35
- name : '_name_' ,
36
- username : '_username_' ,
37
- password : '_password_' ,
38
- dialect : 'sqlite' ,
39
- dialectModulePath : __dirname + '/../utils/db-dialect-dummy'
40
- } as ISequelizeConfig ) ;
34
+ return this . getValidationOnlyConfig ( config ) ;
41
35
}
42
36
43
37
return config as ISequelizeConfig ;
44
38
}
45
39
40
+ static getValidationOnlyConfig ( config : ISequelizeConfig | ISequelizeValidationOnlyConfig ) : ISequelizeConfig {
41
+ return {
42
+ ...config ,
43
+ name : '_name_' ,
44
+ username : '_username_' ,
45
+ password : '_password_' ,
46
+ dialect : 'sqlite' ,
47
+ dialectModulePath : __dirname + '/../utils/db-dialect-dummy'
48
+ } as ISequelizeConfig ;
49
+ }
50
+
46
51
addModels ( models : Array < typeof Model > ) : void ;
47
52
addModels ( modelPaths : string [ ] ) : void ;
48
53
addModels ( arg : Array < typeof Model | string > ) : void {
You can’t perform that action at this time.
0 commit comments