Skip to content

Commit

Permalink
Merge branch 'release/v5.0.0' into develop
Browse files Browse the repository at this point in the history
  • Loading branch information
AnatolyUss committed Oct 11, 2019
2 parents 0fb61c6 + db4ab9f commit 0538c96
Show file tree
Hide file tree
Showing 5 changed files with 20 additions and 22 deletions.
8 changes: 3 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,8 @@ from MySQL to PostgreSQL as easy and smooth as possible.</p>
indexes, primary and foreign keys exactly as they were before migration.</li>

<li>Ability to rename tables and columns during migration.</li>
<li>Ability to recover migration process if disaster took place (without restarting from the beginning).</li>
<li>Ability to migrate big databases - in order to eliminate "process out of memory" issues NMIG will split each table's data into several chunks.<br>Each group of chunks will be loaded via separate worker process.</li>

<li> Speed of data transfer - in order to migrate data fast NMIG uses PostgreSQL COPY protocol.</li>
<li>Ability to recover migration process if disaster took place without restarting from the beginning.</li>
<li>Ability to migrate big databases fast - in order to migrate data NMIG utilizes PostgreSQL COPY protocol.</li>
<li>Ease of monitoring - NMIG will provide detailed output about every step, it takes during the execution.</li>
<li>
Ease of configuration - all the parameters required for migration should be put in one single JSON document.
Expand Down Expand Up @@ -89,7 +87,7 @@ from MySQL to PostgreSQL as easy and smooth as possible.</p>
<b>Note:</b> "logs_directory" will be created during script execution.</p>

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

<h3>KNOWN ISSUES</h3>
Expand Down
20 changes: 10 additions & 10 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 4 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "nmig",
"version": "4.0.2",
"version": "5.0.0",
"description": "The database migration app",
"author": "Anatoly Khaytovich<[email protected]>",
"license": "GPL-3.0",
Expand All @@ -19,11 +19,11 @@
},
"devDependencies": {
"@types/mysql": "^2.15.7",
"@types/node": "^12.7.5",
"@types/pg": "^7.11.1",
"@types/node": "^12.7.12",
"@types/pg": "^7.11.2",
"@types/tape": "^4.2.33",
"tape": "^4.11.0",
"typescript": "^3.6.3"
"typescript": "^3.6.4"
},
"scripts": {
"build": "tsc",
Expand Down
2 changes: 1 addition & 1 deletion src/DataLoader.ts
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,7 @@ async function getJson2csvStream(
): Promise<any> {
const tableColumnsResult: DBAccessQueryResult = await dbAccess.query(
'DataLoader::populateTableWorker',
`SHOW COLUMNS FROM ${ originalTableName };`,
`SHOW COLUMNS FROM \`${ originalTableName }\`;`,
DBVendors.MYSQL,
true,
false
Expand Down
4 changes: 2 additions & 2 deletions src/TableProcessor.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
*
* @author Anatoly Khaytovich <[email protected]>
*/
import { log, generateError } from './FsOps';
import { log } from './FsOps';
import Conversion from './Conversion';
import DBAccess from './DBAccess';
import DBAccessQueryResult from './DBAccessQueryResult';
Expand Down Expand Up @@ -100,7 +100,7 @@ export async function createTable(conversion: Conversion, tableName: string): Pr
.join(',');

const sqlCreateTable: string = `CREATE TABLE IF NOT EXISTS "${ conversion._schema }"."${ tableName }"(${ columnsDefinition });`;
const createTableResult: DBAccessQueryResult = await dbAccess.query(logTitle, sqlCreateTable, DBVendors.PG, false, false);
const createTableResult: DBAccessQueryResult = await dbAccess.query(logTitle, sqlCreateTable, DBVendors.PG, true, false);

if (!createTableResult.error) {
log(conversion, `\t--[${ logTitle }] Table "${ conversion._schema }"."${ tableName }" is created...`, conversion._dicTables[tableName].tableLogPath);
Expand Down

0 comments on commit 0538c96

Please sign in to comment.