From d65b2a803480e24a08d2acd68ea9b7ce0fe4dfbc Mon Sep 17 00:00:00 2001 From: AnatolyUss Date: Sat, 4 Feb 2017 13:51:47 +0200 Subject: [PATCH] add configuration option to change default delimiter, copyright notice --- README.md | 2 +- config.json | 7 +++++++ migration/fmtp/BootProcessor.js | 2 +- migration/fmtp/CleanupProcessor.js | 2 +- migration/fmtp/ColumnsDataArranger.js | 2 +- migration/fmtp/CommentsProcessor.js | 2 +- migration/fmtp/Connector.js | 4 ++-- migration/fmtp/ConsistencyEnforcer.js | 2 +- migration/fmtp/ConstraintsProcessor.js | 2 +- migration/fmtp/Conversion.js | 6 +++++- migration/fmtp/DataChunksProcessor.js | 2 +- migration/fmtp/DataLoader.js | 4 ++-- migration/fmtp/DataPipeManager.js | 2 +- migration/fmtp/DataPoolManager.js | 2 +- migration/fmtp/DataTypesMapReader.js | 2 +- migration/fmtp/DefaultProcessor.js | 2 +- migration/fmtp/DirectoriesManager.js | 2 +- migration/fmtp/EnumProcessor.js | 4 ++-- migration/fmtp/ErrorGenerator.js | 2 +- migration/fmtp/ExtraConfigProcessor.js | 2 +- migration/fmtp/ForeignKeyProcessor.js | 2 +- migration/fmtp/IndexAndKeyProcessor.js | 2 +- migration/fmtp/IntegerValidator.js | 2 +- migration/fmtp/Logger.js | 2 +- migration/fmtp/Main.js | 4 ++-- migration/fmtp/MessageToDataLoader.js | 2 +- migration/fmtp/MessageToMaster.js | 2 +- migration/fmtp/MigrationStateManager.js | 2 +- migration/fmtp/NewBuffer.js | 2 +- migration/fmtp/NullProcessor.js | 4 ++-- migration/fmtp/OldBuffer.js | 2 +- migration/fmtp/ReportGenerator.js | 2 +- migration/fmtp/SchemaProcessor.js | 2 +- migration/fmtp/SequencesProcessor.js | 4 ++-- migration/fmtp/StructureLoader.js | 2 +- migration/fmtp/Table.js | 2 +- migration/fmtp/TableProcessor.js | 4 ++-- migration/fmtp/VacuumProcessor.js | 4 ++-- migration/fmtp/ViewGenerator.js | 4 ++-- nmig.js | 2 +- package.json | 2 +- 41 files changed, 60 insertions(+), 49 deletions(-) diff --git a/README.md b/README.md index f8e8a7ca..f14d6d54 100644 --- a/README.md +++ b/README.md @@ -61,7 +61,7 @@ from MySQL to PostgreSQL as easy and smooth as possible.

anatolyuss@gmail.com

VERSION

-

Current version is 2.5.0
+

Current version is 2.6.0
(major version . improvements . bug fixes)

diff --git a/config.json b/config.json index 02363ede..83eee634 100755 --- a/config.json +++ b/config.json @@ -95,6 +95,13 @@ ], "migrate_only_data" : false, + "delimiter_description" : [ + "Specifies the character that separates columns within each record.", + "This must be a single one-byte character.", + "The default is comma." + ], + "delimiter" : ",", + "enable_extra_config_description" : [ "In order to enable the additional configuration options - set this parameter true." ], diff --git a/migration/fmtp/BootProcessor.js b/migration/fmtp/BootProcessor.js index 021d00d1..db2abde2 100644 --- a/migration/fmtp/BootProcessor.js +++ b/migration/fmtp/BootProcessor.js @@ -1,7 +1,7 @@ /* * This file is a part of "NMIG" - the database migration tool. * - * Copyright (C) 2016 - 2017 Anatoly Khaytovich + * Copyright (C) 2016 - present, Anatoly Khaytovich * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/migration/fmtp/CleanupProcessor.js b/migration/fmtp/CleanupProcessor.js index 84600937..a909b4b6 100644 --- a/migration/fmtp/CleanupProcessor.js +++ b/migration/fmtp/CleanupProcessor.js @@ -1,7 +1,7 @@ /* * This file is a part of "NMIG" - the database migration tool. * - * Copyright (C) 2016 - 2017 Anatoly Khaytovich + * Copyright (C) 2016 - present, Anatoly Khaytovich * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/migration/fmtp/ColumnsDataArranger.js b/migration/fmtp/ColumnsDataArranger.js index 6ae2ac87..d12df14a 100644 --- a/migration/fmtp/ColumnsDataArranger.js +++ b/migration/fmtp/ColumnsDataArranger.js @@ -1,7 +1,7 @@ /* * This file is a part of "NMIG" - the database migration tool. * - * Copyright (C) 2016 - 2017 Anatoly Khaytovich + * Copyright (C) 2016 - present, Anatoly Khaytovich * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/migration/fmtp/CommentsProcessor.js b/migration/fmtp/CommentsProcessor.js index b7b0e77d..1cf3daad 100644 --- a/migration/fmtp/CommentsProcessor.js +++ b/migration/fmtp/CommentsProcessor.js @@ -1,7 +1,7 @@ /* * This file is a part of "NMIG" - the database migration tool. * - * Copyright (C) 2016 - 2017 Anatoly Khaytovich + * Copyright (C) 2016 - present, Anatoly Khaytovich * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/migration/fmtp/Connector.js b/migration/fmtp/Connector.js index 563a3eb8..4a1c1101 100644 --- a/migration/fmtp/Connector.js +++ b/migration/fmtp/Connector.js @@ -1,7 +1,7 @@ /* * This file is a part of "NMIG" - the database migration tool. * - * Copyright (C) 2016 - 2017 Anatoly Khaytovich + * Copyright (C) 2016 - present, Anatoly Khaytovich * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -41,7 +41,7 @@ module.exports = self => { if (!self._mysql) { self._sourceConString.connectionLimit = self._maxPoolSizeSource; const pool = mysql.createPool(self._sourceConString); - + if (pool) { self._mysql = pool; mysqlResolve(); diff --git a/migration/fmtp/ConsistencyEnforcer.js b/migration/fmtp/ConsistencyEnforcer.js index 8fb999f1..a2864ba9 100644 --- a/migration/fmtp/ConsistencyEnforcer.js +++ b/migration/fmtp/ConsistencyEnforcer.js @@ -1,7 +1,7 @@ /* * This file is a part of "NMIG" - the database migration tool. * - * Copyright (C) 2016 - 2017 Anatoly Khaytovich + * Copyright (C) 2016 - present, Anatoly Khaytovich * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/migration/fmtp/ConstraintsProcessor.js b/migration/fmtp/ConstraintsProcessor.js index fe45cbf4..448b92d7 100644 --- a/migration/fmtp/ConstraintsProcessor.js +++ b/migration/fmtp/ConstraintsProcessor.js @@ -1,7 +1,7 @@ /* * This file is a part of "NMIG" - the database migration tool. * - * Copyright (C) 2016 - 2017 Anatoly Khaytovich + * Copyright (C) 2016 - present, Anatoly Khaytovich * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/migration/fmtp/Conversion.js b/migration/fmtp/Conversion.js index a640139d..b4e4948f 100644 --- a/migration/fmtp/Conversion.js +++ b/migration/fmtp/Conversion.js @@ -1,7 +1,7 @@ /* * This file is a part of "NMIG" - the database migration tool. * - * Copyright (C) 2016 - 2017 Anatoly Khaytovich + * Copyright (C) 2016 - present, Anatoly Khaytovich * * This program is free software= you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -93,4 +93,8 @@ module.exports = function Conversion(config) { this._maxLoaderProcesses = this._config.max_loader_processes !== undefined && isIntNumeric(this._config.max_loader_processes) ? +this._config.max_loader_processes : 1; + + this._delimiter = this._config.delimiter !== undefined && this._config.delimiter.length === 1 + ? this._config.delimiter + : ','; }; diff --git a/migration/fmtp/DataChunksProcessor.js b/migration/fmtp/DataChunksProcessor.js index 927b325c..87d961e4 100644 --- a/migration/fmtp/DataChunksProcessor.js +++ b/migration/fmtp/DataChunksProcessor.js @@ -1,7 +1,7 @@ /* * This file is a part of "NMIG" - the database migration tool. * - * Copyright (C) 2016 - 2017 Anatoly Khaytovich + * Copyright (C) 2016 - present, Anatoly Khaytovich * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/migration/fmtp/DataLoader.js b/migration/fmtp/DataLoader.js index 8f3555b2..567e50b9 100644 --- a/migration/fmtp/DataLoader.js +++ b/migration/fmtp/DataLoader.js @@ -1,7 +1,7 @@ /* * This file is a part of "NMIG" - the database migration tool. * - * Copyright (C) 2016 - 2017 Anatoly Khaytovich + * Copyright (C) 2016 - present, Anatoly Khaytovich * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -255,7 +255,7 @@ const populateTableWorker = (self, tableName, strSelectFieldList, offset, rowsIn generateError(self, '\t--[populateTableWorker] Cannot connect to PostgreSQL server...\n' + error, sql); deleteCsv(csvAddr, fd).then(() => resolvePopulateTableWorker()); } else { - const sqlCopy = 'COPY "' + self._schema + '"."' + tableName + '" FROM STDIN DELIMITER \'' + ',\'' + ' CSV;'; + const sqlCopy = 'COPY "' + self._schema + '"."' + tableName + '" FROM STDIN DELIMITER \'' + self._delimiter + '\' CSV;'; const copyStream = client.query(copyFrom(sqlCopy)); const readStream = fs.createReadStream(csvAddr, { encoding: self._encoding }); diff --git a/migration/fmtp/DataPipeManager.js b/migration/fmtp/DataPipeManager.js index cde415a9..2d7a7a3c 100644 --- a/migration/fmtp/DataPipeManager.js +++ b/migration/fmtp/DataPipeManager.js @@ -1,7 +1,7 @@ /* * This file is a part of "NMIG" - the database migration tool. * - * Copyright (C) 2016 - 2017 Anatoly Khaytovich + * Copyright (C) 2016 - present, Anatoly Khaytovich * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/migration/fmtp/DataPoolManager.js b/migration/fmtp/DataPoolManager.js index c9c7d112..fee95032 100644 --- a/migration/fmtp/DataPoolManager.js +++ b/migration/fmtp/DataPoolManager.js @@ -1,7 +1,7 @@ /* * This file is a part of "NMIG" - the database migration tool. * - * Copyright (C) 2016 - 2017 Anatoly Khaytovich + * Copyright (C) 2016 - present, Anatoly Khaytovich * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/migration/fmtp/DataTypesMapReader.js b/migration/fmtp/DataTypesMapReader.js index c441700b..c1e931a1 100644 --- a/migration/fmtp/DataTypesMapReader.js +++ b/migration/fmtp/DataTypesMapReader.js @@ -1,7 +1,7 @@ /* * This file is a part of "NMIG" - the database migration tool. * - * Copyright (C) 2016 - 2017 Anatoly Khaytovich + * Copyright (C) 2016 - present, Anatoly Khaytovich * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/migration/fmtp/DefaultProcessor.js b/migration/fmtp/DefaultProcessor.js index 441a82ae..29cfb390 100644 --- a/migration/fmtp/DefaultProcessor.js +++ b/migration/fmtp/DefaultProcessor.js @@ -1,7 +1,7 @@ /* * This file is a part of "NMIG" - the database migration tool. * - * Copyright (C) 2016 - 2017 Anatoly Khaytovich + * Copyright (C) 2016 - present, Anatoly Khaytovich * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/migration/fmtp/DirectoriesManager.js b/migration/fmtp/DirectoriesManager.js index 3ce7c6ac..248bd1d5 100644 --- a/migration/fmtp/DirectoriesManager.js +++ b/migration/fmtp/DirectoriesManager.js @@ -1,7 +1,7 @@ /* * This file is a part of "NMIG" - the database migration tool. * - * Copyright (C) 2016 - 2017 Anatoly Khaytovich + * Copyright (C) 2016 - present, Anatoly Khaytovich * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/migration/fmtp/EnumProcessor.js b/migration/fmtp/EnumProcessor.js index 41eade91..bae8eb17 100644 --- a/migration/fmtp/EnumProcessor.js +++ b/migration/fmtp/EnumProcessor.js @@ -1,7 +1,7 @@ /* * This file is a part of "NMIG" - the database migration tool. * - * Copyright (C) 2016 - 2017 Anatoly Khaytovich + * Copyright (C) 2016 - present, Anatoly Khaytovich * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -40,7 +40,7 @@ module.exports = (self, tableName) => { log(self, '\t--[processEnum] Defines "ENUMs" for table "' + self._schema + '"."' + tableName + '"', self._dicTables[tableName].tableLogPath); const processEnumPromises = []; const originalTableName = extraConfigProcessor.getTableName(self, tableName, true); - + for (let i = 0; i < self._dicTables[tableName].arrTableColumns.length; ++i) { if (self._dicTables[tableName].arrTableColumns[i].Type.indexOf('(') !== -1) { const arrType = self._dicTables[tableName].arrTableColumns[i].Type.split('('); diff --git a/migration/fmtp/ErrorGenerator.js b/migration/fmtp/ErrorGenerator.js index 0dbe8b68..89ea6665 100644 --- a/migration/fmtp/ErrorGenerator.js +++ b/migration/fmtp/ErrorGenerator.js @@ -1,7 +1,7 @@ /* * This file is a part of "NMIG" - the database migration tool. * - * Copyright (C) 2016 - 2017 Anatoly Khaytovich + * Copyright (C) 2016 - present, Anatoly Khaytovich * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/migration/fmtp/ExtraConfigProcessor.js b/migration/fmtp/ExtraConfigProcessor.js index ba3dee2c..63db742e 100644 --- a/migration/fmtp/ExtraConfigProcessor.js +++ b/migration/fmtp/ExtraConfigProcessor.js @@ -1,7 +1,7 @@ /* * This file is a part of "NMIG" - the database migration tool. * - * Copyright (C) 2016 - 2017 Anatoly Khaytovich + * Copyright (C) 2016 - present, Anatoly Khaytovich * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/migration/fmtp/ForeignKeyProcessor.js b/migration/fmtp/ForeignKeyProcessor.js index 8be99c51..5bbc1d59 100644 --- a/migration/fmtp/ForeignKeyProcessor.js +++ b/migration/fmtp/ForeignKeyProcessor.js @@ -1,7 +1,7 @@ /* * This file is a part of "NMIG" - the database migration tool. * - * Copyright (C) 2016 - 2017 Anatoly Khaytovich + * Copyright (C) 2016 - present, Anatoly Khaytovich * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/migration/fmtp/IndexAndKeyProcessor.js b/migration/fmtp/IndexAndKeyProcessor.js index c745cb48..a7c59e3e 100644 --- a/migration/fmtp/IndexAndKeyProcessor.js +++ b/migration/fmtp/IndexAndKeyProcessor.js @@ -1,7 +1,7 @@ /* * This file is a part of "NMIG" - the database migration tool. * - * Copyright (C) 2016 - 2017 Anatoly Khaytovich + * Copyright (C) 2016 - present, Anatoly Khaytovich * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/migration/fmtp/IntegerValidator.js b/migration/fmtp/IntegerValidator.js index 8326350c..ef2f730a 100644 --- a/migration/fmtp/IntegerValidator.js +++ b/migration/fmtp/IntegerValidator.js @@ -1,7 +1,7 @@ /* * This file is a part of "NMIG" - the database migration tool. * - * Copyright (C) 2016 - 2017 Anatoly Khaytovich + * Copyright (C) 2016 - present, Anatoly Khaytovich * * This program is free software= you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/migration/fmtp/Logger.js b/migration/fmtp/Logger.js index 123d8d72..700a4630 100644 --- a/migration/fmtp/Logger.js +++ b/migration/fmtp/Logger.js @@ -1,7 +1,7 @@ /* * This file is a part of "NMIG" - the database migration tool. * - * Copyright (C) 2016 - 2017 Anatoly Khaytovich + * Copyright (C) 2016 - present, Anatoly Khaytovich * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/migration/fmtp/Main.js b/migration/fmtp/Main.js index b1811a15..bf22bd90 100644 --- a/migration/fmtp/Main.js +++ b/migration/fmtp/Main.js @@ -1,7 +1,7 @@ /* * This file is a part of "NMIG" - the database migration tool. * - * Copyright (C) 2016 - 2017 Anatoly Khaytovich + * Copyright (C) 2016 - present, Anatoly Khaytovich * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -42,7 +42,7 @@ const boot = require('./BootProcessor'); */ module.exports = config => { const self = new Conversion(config); - + boot(self).then(() => { return readDataTypesMap(self); }).then( diff --git a/migration/fmtp/MessageToDataLoader.js b/migration/fmtp/MessageToDataLoader.js index d4c9ef74..dde54ec2 100644 --- a/migration/fmtp/MessageToDataLoader.js +++ b/migration/fmtp/MessageToDataLoader.js @@ -1,7 +1,7 @@ /* * This file is a part of "NMIG" - the database migration tool. * - * Copyright (C) 2016 - 2017 Anatoly Khaytovich + * Copyright (C) 2016 - present, Anatoly Khaytovich * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/migration/fmtp/MessageToMaster.js b/migration/fmtp/MessageToMaster.js index 35d48275..4961390e 100644 --- a/migration/fmtp/MessageToMaster.js +++ b/migration/fmtp/MessageToMaster.js @@ -1,7 +1,7 @@ /* * This file is a part of "NMIG" - the database migration tool. * - * Copyright (C) 2016 - 2017 Anatoly Khaytovich + * Copyright (C) 2016 - present, Anatoly Khaytovich * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/migration/fmtp/MigrationStateManager.js b/migration/fmtp/MigrationStateManager.js index 0a566c6e..0a1e716a 100644 --- a/migration/fmtp/MigrationStateManager.js +++ b/migration/fmtp/MigrationStateManager.js @@ -1,7 +1,7 @@ /* * This file is a part of "NMIG" - the database migration tool. * - * Copyright (C) 2016 - 2017 Anatoly Khaytovich + * Copyright (C) 2016 - present, Anatoly Khaytovich * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/migration/fmtp/NewBuffer.js b/migration/fmtp/NewBuffer.js index 3dc4a243..d6e94af5 100644 --- a/migration/fmtp/NewBuffer.js +++ b/migration/fmtp/NewBuffer.js @@ -1,7 +1,7 @@ /* * This file is a part of "NMIG" - the database migration tool. * - * Copyright (C) 2016 - 2017 Anatoly Khaytovich + * Copyright (C) 2016 - present, Anatoly Khaytovich * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/migration/fmtp/NullProcessor.js b/migration/fmtp/NullProcessor.js index a372ce0e..b4ee898e 100644 --- a/migration/fmtp/NullProcessor.js +++ b/migration/fmtp/NullProcessor.js @@ -1,7 +1,7 @@ /* * This file is a part of "NMIG" - the database migration tool. * - * Copyright (C) 2016 - 2017 Anatoly Khaytovich + * Copyright (C) 2016 - present, Anatoly Khaytovich * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -40,7 +40,7 @@ module.exports = (self, tableName) => { log(self, '\t--[processNull] Defines "NOT NULLs" for table: "' + self._schema + '"."' + tableName + '"', self._dicTables[tableName].tableLogPath); const processNullPromises = []; const originalTableName = extraConfigProcessor.getTableName(self, tableName, true); - + for (let i = 0; i < self._dicTables[tableName].arrTableColumns.length; ++i) { if (self._dicTables[tableName].arrTableColumns[i].Null.toLowerCase() === 'no') { processNullPromises.push( diff --git a/migration/fmtp/OldBuffer.js b/migration/fmtp/OldBuffer.js index 927fb959..6707e70d 100644 --- a/migration/fmtp/OldBuffer.js +++ b/migration/fmtp/OldBuffer.js @@ -1,7 +1,7 @@ /* * This file is a part of "NMIG" - the database migration tool. * - * Copyright (C) 2016 - 2017 Anatoly Khaytovich + * Copyright (C) 2016 - present, Anatoly Khaytovich * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/migration/fmtp/ReportGenerator.js b/migration/fmtp/ReportGenerator.js index 2a3190d8..d5830895 100644 --- a/migration/fmtp/ReportGenerator.js +++ b/migration/fmtp/ReportGenerator.js @@ -1,7 +1,7 @@ /* * This file is a part of "NMIG" - the database migration tool. * - * Copyright (C) 2016 - 2017 Anatoly Khaytovich + * Copyright (C) 2016 - present, Anatoly Khaytovich * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/migration/fmtp/SchemaProcessor.js b/migration/fmtp/SchemaProcessor.js index 9a4e31e2..321470b3 100644 --- a/migration/fmtp/SchemaProcessor.js +++ b/migration/fmtp/SchemaProcessor.js @@ -1,7 +1,7 @@ /* * This file is a part of "NMIG" - the database migration tool. * - * Copyright (C) 2016 - 2017 Anatoly Khaytovich + * Copyright (C) 2016 - present, Anatoly Khaytovich * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/migration/fmtp/SequencesProcessor.js b/migration/fmtp/SequencesProcessor.js index 50f5265e..1424ea97 100644 --- a/migration/fmtp/SequencesProcessor.js +++ b/migration/fmtp/SequencesProcessor.js @@ -1,7 +1,7 @@ /* * This file is a part of "NMIG" - the database migration tool. * - * Copyright (C) 2016 - 2017 Anatoly Khaytovich + * Copyright (C) 2016 - present, Anatoly Khaytovich * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -104,7 +104,7 @@ module.exports.createSequence = (self, tableName) => { return new Promise(resolve => { const createSequencePromises = []; const originalTableName = extraConfigProcessor.getTableName(self, tableName, true); - + for (let i = 0; i < self._dicTables[tableName].arrTableColumns.length; ++i) { if (self._dicTables[tableName].arrTableColumns[i].Extra === 'auto_increment') { createSequencePromises.push( diff --git a/migration/fmtp/StructureLoader.js b/migration/fmtp/StructureLoader.js index 5466f6d1..a2268274 100644 --- a/migration/fmtp/StructureLoader.js +++ b/migration/fmtp/StructureLoader.js @@ -1,7 +1,7 @@ /* * This file is a part of "NMIG" - the database migration tool. * - * Copyright (C) 2016 - 2017 Anatoly Khaytovich + * Copyright (C) 2016 - present, Anatoly Khaytovich * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/migration/fmtp/Table.js b/migration/fmtp/Table.js index 2176f0b8..a048073f 100644 --- a/migration/fmtp/Table.js +++ b/migration/fmtp/Table.js @@ -1,7 +1,7 @@ /* * This file is a part of "NMIG" - the database migration tool. * - * Copyright (C) 2016 - 2017 Anatoly Khaytovich + * Copyright (C) 2016 - present, Anatoly Khaytovich * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/migration/fmtp/TableProcessor.js b/migration/fmtp/TableProcessor.js index f85b43b9..844d3624 100644 --- a/migration/fmtp/TableProcessor.js +++ b/migration/fmtp/TableProcessor.js @@ -1,7 +1,7 @@ /* * This file is a part of "NMIG" - the database migration tool. * - * Copyright (C) 2016 - 2017 Anatoly Khaytovich + * Copyright (C) 2016 - present, Anatoly Khaytovich * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -127,7 +127,7 @@ module.exports.createTable = (self, tableName) => { } sql += '"' + self._schema + '_' + originalTableName + '_data_chunk_id_temp" BIGINT);'; - + client.query(sql, err => { done(); diff --git a/migration/fmtp/VacuumProcessor.js b/migration/fmtp/VacuumProcessor.js index 64f8fa3d..c95621e2 100644 --- a/migration/fmtp/VacuumProcessor.js +++ b/migration/fmtp/VacuumProcessor.js @@ -1,7 +1,7 @@ /* * This file is a part of "NMIG" - the database migration tool. * - * Copyright (C) 2016 - 2017 Anatoly Khaytovich + * Copyright (C) 2016 - present, Anatoly Khaytovich * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -36,7 +36,7 @@ module.exports = self => { return connect(self).then(() => { return new Promise(resolve => { const vacuumPromises = []; - + for (let i = 0; i < self._tablesToMigrate.length; ++i) { if (self._noVacuum.indexOf(extraConfigProcessor.getTableName(self, self._tablesToMigrate[i], true)) === -1) { const msg = '\t--[runVacuumFullAndAnalyze] Running "VACUUM FULL and ANALYZE" query for table "' diff --git a/migration/fmtp/ViewGenerator.js b/migration/fmtp/ViewGenerator.js index 367aa238..2b50c61f 100644 --- a/migration/fmtp/ViewGenerator.js +++ b/migration/fmtp/ViewGenerator.js @@ -1,7 +1,7 @@ /* * This file is a part of "NMIG" - the database migration tool. * - * Copyright (C) 2016 - 2017 Anatoly Khaytovich + * Copyright (C) 2016 - present, Anatoly Khaytovich * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -122,7 +122,7 @@ module.exports = self => { return migrationStateManager.get(self, 'views_loaded').then(hasViewsLoaded => { return new Promise(resolve => { const createViewPromises = []; - + if (!hasViewsLoaded) { for (let i = 0; i < self._viewsToMigrate.length; ++i) { createViewPromises.push( diff --git a/nmig.js b/nmig.js index e8f80daf..d53fcf3b 100644 --- a/nmig.js +++ b/nmig.js @@ -1,7 +1,7 @@ /* * This file is a part of "NMIG" - the database migration tool. * - * Copyright (C) 2016 - 2017 Anatoly Khaytovich + * Copyright (C) 2016 - present, Anatoly Khaytovich * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/package.json b/package.json index 6f897e23..fbd3a87c 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "nmig", - "version": "2.5.0", + "version": "2.6.0", "description": "The database migration app", "author": "Anatoly Khaytovich", "dependencies": {