import Conversion from './Conversion' ; import createSchema from './SchemaProcessor' ; import loadStructureToMigrate from './StructureLoader' ; import pipeData from './DataPipeManager' ; import decodeBinaryData from './BinaryDataDecoder' ; import generateReport from './ReportGenerator' ; import DBAccess from './DBAccess' ; import { dropDataPoolTable } from './DataPoolManager' ; import { processConstraints } from './ConstraintsProcessor' ; import { getConfAndLogsPaths , boot } from './BootProcessor' ; import { createStateLogsTable , dropStateLogsTable } from './MigrationStateManager' ; import { createDataPoolTable , readDataPool } from './DataPoolManager' ; import { readConfig , readExtraConfig , createLogsDirectory , readDataAndIndexTypesMap } from './FsOps' ; const { confPath , logsPath } = getConfAndLogsPaths ( ) ; readConfig ( confPath , logsPath ) . then ( config => readExtraConfig ( config , confPath ) ) . then ( Conversion . initializeConversion ) . then ( createLogsDirectory ) . then ( readDataAndIndexTypesMap ) . then ( boot ) . then ( createSchema ) . then ( createStateLogsTable ) . then ( createDataPoolTable ) . then ( loadStructureToMigrate ) . then ( readDataPool ) . then ( pipeData ) . then ( decodeBinaryData ) . then ( processConstraints ) . then ( dropDataPoolTable ) . then ( dropStateLogsTable ) . then ( DBAccess . closeConnectionPools ) . then ( generateReport ) ;