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 {
3131
3232 if ( config . validateOnly ) {
3333
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 ) ;
4135 }
4236
4337 return config as ISequelizeConfig ;
4438 }
4539
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+
4651 addModels ( models : Array < typeof Model > ) : void ;
4752 addModels ( modelPaths : string [ ] ) : void ;
4853 addModels ( arg : Array < typeof Model | string > ) : void {
You can’t perform that action at this time.
0 commit comments