Made `dbConfig` available for customized.

Made `dbConfig` available for customized. Besides, fixed a critical bugs with illegally defined constant.