Skip to content

Commit

Permalink
Merge branch 'release/v5.3.0'
Browse files Browse the repository at this point in the history
  • Loading branch information
AnatolyUss committed Jun 29, 2020
2 parents d33fcfc + 3e91d54 commit eb53749
Show file tree
Hide file tree
Showing 22 changed files with 656 additions and 393 deletions.
39 changes: 30 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ from MySQL to PostgreSQL as easy and smooth as possible.</p>

<h3>SYSTEM REQUIREMENTS</h3>
<ul>
<li> <b>Node.js 8 or higher</b></li>
<li> <b>Node.js 10 or higher</b></li>
</ul>

<h3>USAGE</h3>
Expand All @@ -38,22 +38,35 @@ from MySQL to PostgreSQL as easy and smooth as possible.</p>
<ul>
<li> config.json contains brief description of each configuration parameter</li>
<li>Make sure, that username, you use in your PostgreSQL connection details, defined as superuser (usually "postgres")<br> More info: <a href="http://www.postgresql.org/docs/current/static/app-createuser.html">http://www.postgresql.org/docs/current/static/app-createuser.html</a></li>
<li>
<ul>
<li>As an option, you can move the entire <code>config</code> folder out of Nmig's directory and place it in any location</li>
<li>As an option, you can store the Nmig's logs in any location. All you need to do is to create the <code>nmig_logs</code> directory</li>
</ul>
</li>
</ul>

<p><b>4.</b> Go to Nmig directory, install dependencies, compile and run the app<br />
&nbsp;&nbsp;&nbsp;&nbsp;<b>Sample:</b><br />
<b>Sample:</b><br />
<pre>$ cd /path/to/nmig</pre><br />
<pre>$ npm install</pre><br />
<pre>$ npm run build</pre><br />
<pre>$ npm start</pre><br />
</p>
<b>Or, if you have moved <code>config</code> folder out from Nmig's directory:</b><br /><br />
<pre>npm start -- --conf-dir='/path/to/nmig_config' --logs-dir='/path/to/nmig_logs'</pre><br />

<p><b>5.</b> If a disaster took place during migration (for what ever reason) - simply restart the process
<code>$ npm start</code><br>&nbsp;&nbsp;&nbsp;&nbsp;NMIG will restart from the point it was stopped at.
<code>$ npm start</code><br />
Or, if you have moved <code>config</code> folder out from Nmig's directory:<br />
<code>$ npm start -- --conf-dir='/path/to/nmig_config' --logs-dir='/path/to/nmig_logs'</code><br />

&nbsp;&nbsp;&nbsp;&nbsp;NMIG will restart from the point it was stopped at.
</p>

<p><b>6.</b> At the end of migration check log files, if necessary.<br />&nbsp;&nbsp;&nbsp;
Log files will be located under "logs_directory" folder in the root of the package.<br />&nbsp;&nbsp;&nbsp;
<b>Note:</b> If you've created <code>nmig_logs</code> folder outside the nmig's directory than "logs_directory" will reside in <code>nmig_logs</code>.
<br />
<b>Note:</b> "logs_directory" will be created during script execution.</p>


Expand All @@ -65,7 +78,7 @@ from MySQL to PostgreSQL as easy and smooth as possible.</p>
<p><b>1.</b> Create a new PostgreSQL database.<br />
<b>Sample:</b>&nbsp;<code> CREATE DATABASE nmig_test_db;</code><br />
</p>
<p><b>2.</b> Download Nmig package.<br/ ><b>Sample:</b>&nbsp;<code>/path/to/nmig</code></p>
<p><b>2.</b> Download Nmig package.<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/test_config.json</code> with correct details.<br /></p>
<b>Notes:</b>
<ul>
Expand All @@ -74,21 +87,29 @@ from MySQL to PostgreSQL as easy and smooth as possible.</p>
More info:
<a href="http://www.postgresql.org/docs/current/static/app-createuser.html">http://www.postgresql.org/docs/current/static/app-createuser.html</a>
</li>
<li>
<ul>
<li>As an option, you can move the entire <code>config</code> folder out of Nmig's directory and place it in any location</li>
<li>As an option, you can store the Nmig's logs in any location. All you need to do is to create the <code>nmig_logs</code> directory</li>
</ul>
</li>
</ul>
<p><b>4.</b> Go to nmig directory, install dependencies, compile and run tests<br />
&nbsp;&nbsp;&nbsp;&nbsp;<b>Sample:</b><br />
<b>Sample:</b><br />
<pre>$ cd /path/to/nmig</pre><br />
<pre>$ npm install</pre><br />
<pre>$ npm run build</pre><br />
<pre>$ npm test</pre><br />
<b>Or, if you have moved <code>config</code> folder out from Nmig's directory:</b><br /><br />
<pre>npm test -- --conf-dir='/path/to/nmig_config' --logs-dir='/path/to/nmig_logs'</pre><br />
</p>
<p><b>5.</b> At the end of migration check log files, if necessary.<br />&nbsp;&nbsp;&nbsp;
Log files will be located under "logs_directory" folder in the root of the package.<br />&nbsp;&nbsp;&nbsp;
<b>Note:</b> "logs_directory" will be created during script execution.</p>
<b>Note:</b> If you've created <code>nmig_logs</code> folder outside the nmig's directory than "logs_directory" will reside in <code>nmig_logs</code>.
<br /><b>Note:</b> "logs_directory" will be created during script execution.</p>

<h3>VERSION</h3>
<p>Current version is 5.2.0<br />
(major version . improvements . bug fixes)</p>
<p>Current version is 5.3.0<br />

<h3>LICENSE</h3>
<p>NMIG is available under "GNU GENERAL PUBLIC LICENSE" (v. 3) <br />
Expand Down
21 changes: 6 additions & 15 deletions config/config.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,13 +35,13 @@
"password" : "0123456789"
},

"max_db_connection_pool_size_description" : [
"Maximal amount of simultaneous connections to your MySQL and PostgreSQL servers.",
"For example: 10 means, that nmig will create a pool of 10 connections to MySQL server",
"and 10 connections to PostgreSQL server.",
"20 connections to both servers."
"max_each_db_connection_pool_size_description" : [
"Maximal amount of simultaneous connections to your MySQL and PostgreSQL servers each.",
"Example: 20 means, that Nmig will create a pool of 20 connections to the source MySQL server",
"and 20 connections to the target PostgreSQL server.",
"40 connections to both servers."
],
"max_db_connection_pool_size" : 10,
"max_each_db_connection_pool_size" : 20,

"loader_max_old_space_size_description" : [
"V8 memory limit of the loader process.",
Expand Down Expand Up @@ -69,15 +69,6 @@
],
"schema" : "public",

"no_vacuum_description" : [
"PostgreSQL VACUUM reclaims storage occupied by dead tuples.",
"VACUUM is a very time-consuming procedure.",
"By default, VACUUM will be performed automatically after migration (recommended)",
"This behavior can be disabled for tables, included into the list (Array) below.",
"Table names, included into the list below should be names, you use in your source database (MySQL)."
],
"no_vacuum" : [],

"exclude_tables_description": [
"List (Array) of tables, that will not be migrated.",
"By default, nmig will migrate all tables."
Expand Down
Loading

0 comments on commit eb53749

Please sign in to comment.