moved configuration files into config directory

This commit is contained in:
Anatoly 2018-02-14 09:56:04 +02:00
parent 810e762bf5
commit b0400f00a3
8 changed files with 8 additions and 8 deletions

View file

@ -35,7 +35,7 @@ from MySQL to PostgreSQL as easy and smooth as possible.</p>
<p><b>2.</b> Download Nmig package and put it on the machine running your PostgreSQL (not mandatory, but preferably).<br />
<b>Sample:</b>&nbsp;<code>/path/to/nmig</code></p>
<p><b>3.</b> Edit configuration file located at <code>/path/to/nmig/config.json</code> with correct details.<br /></p>
<p><b>3.</b> Edit configuration file located at <code>/path/to/nmig/config/config.json</code> with correct details.<br /></p>
<b>Notes:</b>
<ul>
<li> config.json contains brief description of each configuration parameter</li>
@ -67,7 +67,7 @@ from MySQL to PostgreSQL as easy and smooth as possible.</p>
<b>Sample:</b>&nbsp;<code> CREATE DATABASE nmig_test_db;</code><br />
</p>
<p><b>2.</b> Download Nmig package.</p>
<p><b>3.</b> Edit configuration file located at <code>/path/to/nmig/test_config.json</code> with correct details.<br /></p>
<p><b>3.</b> Edit configuration file located at <code>/path/to/nmig/config/test_config.json</code> with correct details.<br /></p>
<b>Notes:</b>
<ul>
<li> test_config.json contains brief description of each configuration parameter</li>

0
config.json → config/config.json Executable file → Normal file
View file

View file

@ -23,7 +23,7 @@
const fs = require('fs');
/**
* Reads "./data_types_map.json" and converts its json content to js object.
* Reads "./config/data_types_map.json" and converts its json content to js object.
* Appends this object to "FromMySQL2PostgreSQL" instance.
*
* @param {Conversion} self

View file

@ -44,7 +44,7 @@ const Main = class {
*/
readConfig(baseDir, configFileName = 'config.json') {
return new Promise(resolve => {
const strPathToConfig = path.join(baseDir, configFileName);
const strPathToConfig = path.join(baseDir, 'config', configFileName);
fs.readFile(strPathToConfig, (error, data) => {
if (error) {
@ -54,7 +54,7 @@ const Main = class {
const config = JSON.parse(data);
config.logsDirPath = path.join(baseDir, 'logs_directory');
config.dataTypesMapAddr = path.join(baseDir, 'data_types_map.json');
config.dataTypesMapAddr = path.join(baseDir, 'config', 'data_types_map.json');
resolve(config);
});
});
@ -75,7 +75,7 @@ const Main = class {
return resolve(config);
}
const strPathToExtraConfig = path.join(baseDir, 'extra_config.json');
const strPathToExtraConfig = path.join(baseDir, 'config', 'extra_config.json');
fs.readFile(strPathToExtraConfig, (error, data) => {
if (error) {

View file

@ -27,8 +27,8 @@ const extraConfigProcessor = require('./ExtraConfigProcessor');
/**
* Converts MySQL data types to corresponding PostgreSQL data types.
* This conversion performs in accordance to mapping rules in './data_types_map.json'.
* './data_types_map.json' can be customized.
* This conversion performs in accordance to mapping rules in './config/data_types_map.json'.
* './config/data_types_map.json' can be customized.
*
* @param {Object} objDataTypesMap
* @param {String} mySqlDataType