Giter Club home page Giter Club logo

datamaintain's People

Contributors

aditya-jetely-07 avatar asolovieff avatar clovis-ai avatar delni avatar dependabot[bot] avatar driccio avatar fbreuneval avatar frankschmitt avatar lysoun avatar mrenou avatar nroulon avatar xhanin avatar zplusp avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

datamaintain's Issues

Extract generic driver configuration

In a driver configuration, the following properties :

  • db.DRIVER.uri
  • db.DRIVER.tmp.path
  • db.DRIVER.client.path
  • db.DRIVER.print.output
  • db.DRIVER.save.output
    Are redundant. They could be unified, at least in the code.

Add check stage

FR:
CHECK : Vérifie l'état des scripts, que ce soit de manière unitaire ou bien les uns par rapport aux autres. Ex : l'ordre de jeu a changé, un script n'existe plus par rapport à l'execution précédente

Si activé en conf, vérifier que les scripts déjà joués (via MD5) existent toujours. Si ce n'est pas le cas alors erreur et on stoppe.
On essaye de voir si le script existe dans la liste des scripts à jouer via son nom et s'il est trouvé alors dans le rapport d'erreur on suggère que ce script pourrait avoir été modifié et on propose une ligne de commande pour pallier le problème.
Si activé en conf, on vérifie l'ordre de jeu, en vérifiant que les scripts à jouer sont bien censés être joués après ceux déjà joués.
Si activé en conf, vérifier l'intégrité syntaxique du fichier. (si des libs existent)
Générer un rapport
Le logger si mode verbose
Le sauver si sauvegarde activée

Bug issue template

Create a template to create an Issue of type Bug, in order to have formatted issues with all data we need.

Verbose mode

The verbose mode logs all the reports produced by DataMaintain.

IllegalStateException not explicit when no mongo executable

I am using Datamaintain embedded in my project.
I do not have mongo on my computer and am using a container to store my database with the correct mongo version. When I am launching my server, with Datamaintain enabled, I have this error:

java.lang.IllegalStateException: Cannot run program "mongo" (in directory "."): error=2, No such file or directory
	at datamaintain.core.util.ProcessUtilKt.runProcess(ProcessUtil.kt:26)
	at datamaintain.core.util.ProcessUtilKt.runProcess$default(ProcessUtil.kt:12)
	at datamaintain.db.driver.mongo.MongoDriver.executeMongoQuery(MongoDriver.kt:84)
	at datamaintain.db.driver.mongo.MongoDriver.listExecutedScripts(MongoDriver.kt:72)
	at datamaintain.core.step.Pruner.prune(Pruner.kt:12)
	at datamaintain.core.Datamaintain.updateDatabase(Datamaintain.kt:36)
	at com.beclm.base.mongo.DB.launchDataMaintain(MongoRepository.kt:245)
	at com.beclm.core.server.AppModule.mongoClient(AppModule.kt:34)
	at com.beclm.core.server.AppModuleFactoryMachine$4.doNewComponent(AppModuleFactoryMachine.java:80)
	at com.beclm.core.server.AppModuleFactoryMachine$4.doNewComponent(AppModuleFactoryMachine.java:68)
	at restx.factory.StdMachineEngine.newComponent(StdMachineEngine.java:37)
	at restx.factory.Factory.buildAndStore(Factory.java:1249)
	at restx.factory.Factory.buildAndStore(Factory.java:1216)
	at restx.factory.Factory.satisfyBoms(Factory.java:1175)
	at restx.factory.Factory.buildAndStore(Factory.java:1069)
	at restx.factory.Factory.access$600(Factory.java:37)
	at restx.factory.Factory$NameQuery.doFindOne(Factory.java:604)
	at restx.factory.Factory$SingleQuery.doFind(Factory.java:521)
	at restx.factory.Factory$Query.find(Factory.java:448)
	at restx.factory.Factory$ClassQuery.doFind(Factory.java:662)
	at restx.factory.Factory$MultipleQuery.doFindOne(Factory.java:486)
	at restx.factory.Factory$Query.findOne(Factory.java:437)
	at restx.factory.Factory$Query.findOneAsComponent(Factory.java:440)
	at restx.factory.Factory.getComponent(Factory.java:798)
	at restx.RestxMainRouterFactory.newStdRouter(RestxMainRouterFactory.java:555)
	at restx.RestxMainRouterFactory.build(RestxMainRouterFactory.java:380)
	at restx.RestxMainRouterFactory.newInstance(RestxMainRouterFactory.java:75)
	at restx.servlet.RestxMainRouterServlet.init(RestxMainRouterServlet.java:74)
	at org.apache.catalina.core.StandardWrapper.initServlet(StandardWrapper.java:1269)
	at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1182)
	at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:1072)
	at org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:5368)
	at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5660)
	at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:145)
	at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1571)
	at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1561)
	at java.util.concurrent.FutureTask.run(FutureTask.java:266)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
	at java.lang.Thread.run(Thread.java:748)

It happens because there is no mongo executable on my computer but the error is not very user-friendly. The way to solve this problem would be to give a path to a mongo executable to Datamaintain and Datamaintain should throw an error giving a way to solve the problem, to help users.

An exception will be thrown in the pruner, which collects the executed scripts from the database, and in the executor, which tries to run scripts on the database.

How to write a driver

Describe how to write a driver for newcomers that may want a driver for their favourite database.

Add "datamaintain" as a prefix for all the properties keys

The properties read by Datamaintain have no prefix currently. For example, the one used to read the db uri is db.uri. It may cause problems if the user's application has also properties named like that. To avoid any collision, a prefix should be added to all the Datamaintain properties keys.

Please change them in

  • DatamaintainDriverConfig
  • DatamaintainConfig

Once it's done, please ensure that:

  • The tests pass. Fix them otherwise
  • The samples are not broken because of mismatching properties names
  • The documentation is up to date

Delete mongo bson

bson dependency has some problem with mongo driver 2.x. Delete dependency and use full json object OR use another method for generate an ObjectId

Throw exception when no id was extracted

When the regex used to define identifiers is wrong, Datamaintain still extracts an empty id and goes on. Scripts with an empty id will always be played first.
I suggest throwing an exception indicating what happened and which scripts are concerned.

Restx mongo java sample

Provide a sample to show how to use Datamaintain using Restx, with the mongo driver. An option would be to write an Autostartable. Please put it with other samples. and add a README to explain what your sample does. You can reuse what was done for the java mongo sample.

Scripts not executed in order

./bin/cli --db-type mongo --mongo-uri mongodb://localhost:27017/my-db update-db --path path-to-my-scripts --identifier-regex (.*)_.* --execution-mode FORCE_MARK_AS_EXECUTED

-->

- 299 files scanned
- 299 files filtered
- 299 files pruned
- 299 files executed
 -> v1.31.0.2-addSupportContact.js
 -> v1.1_removeEmoSecurityLevel.js
 -> v1.1_updateSubscriptionDefLimitation.js
 -> v1.2_invoicePaymentContext.js
 -> v1.2_otp_plugs.js
 -> v1.2_otp_stations.js
 -> v1.2_templates.js
 -> v1.3_addMediaConfiguration.js
 -> v1.3_updateCities.js
 -> v1.3_vehicleModel.js
 -> v1.4_addDefaultTypeToFamily.js
 -> v1.4_addOtpUserGroup.js
 -> v1.4_addSmsProviderRelation.js
 -> v1.4_otp_rename_alias.js
 -> v1.5_addDebtClaimTemplate.js
 -> v1.5_setFixedPartDate.js
 -> v1.5_updateInvoiceInitialStatusTemplate.js
 -> v1.8_addNewOtpTemplate.js
 -> v1.8_addPaidInvoiceTemplate.js
 -> v1.8_tradeAgreementKind.js
 -> v1.8_updateSupervisorServiceProperties.js
 -> v1.9_addTemplates.js
 -> v0.13_templates.js
 -> v1.11_addInvoiceIdInConsumption.js
 -> v1.11_createCPOI18nLabels.js
 -> v1.11_createFOI18nLabels.js
 -> v1.11_createOfferI18nLabels.js
 -> v1.11_createSubscriptionDefs18nLabels.js
 -> v1.11_createSubscriptionPackI18nLabels.js
 -> v1.11_fixStationGroupCpoRef.js
 -> v1.11_moveDocumentRefsToI18nCollection.js
 -> v1.11_renameLabelsCollection.js
 -> v1.12_copyTermsCodeToFrontOperatorCollection.js
 -> v1.12_fixStationGroupRefs.js
 -> v1.12_newsFeed.js
 -> v1.12_setBookable.js
 -> v1.13_addLastUpdateDate.js
 -> v1.13_addOperatorProperty.js
 -> v1.13_availableRemoteAction.js
 -> v1.13_renameMediaRoamingId.js
 -> v1.13_setChargePointExternalId.js
 -> v1.14_addCommunityConfigToCPOAndFO.js
 -> v1.14_addDefaultNetworksConfig_1842.js
 -> v1.14_addKeywordsToChargeAreas_1814.js
 -> v1.14_addTwitterNewsFeedConfig_1594.js
 -> v1.14_unknownChargeAreaAllowedConfiguration.js
 -> v1.14_updateInvoiceRules_1787.js
 -> v1.15_removeCb.js
 -> v1.16_externalIECreateBySupervisor.js
 -> v1.17_addOrderPropertiesToInvoice.js
 -> V1.18_renameChargeRecordNotification.js
 -> v1.18_addCpoPermission.js
 -> v1.18_multiple_mva_computations.js
 -> v1.18_removeManagedUpdatedProperties.js
 -> v1.18_renameSubscriptionRateGridRef.js
 -> v1.19_addMediaAuthorizationsIndexes.js
 -> v1.20_addEmoRefsToMediaAuthorization.js
 -> v1.20_addLocaleToUsers.js
 -> v1.20_addPlugDisplayModeToFO.js
 -> v1.20_removeBrandsFromUserSearchConfig.js
 -> v1.20_removeFoDefaultNetworks.js
 -> v1.20_renameMediaCodeHash.js
 -> v1.20_templateReservation.js
 -> v1.21_addDisableReasonToMediaUsages.js
 -> v1.21_addReceivedStatusToMediaOrders.js
 -> v1.21_i18nLabelWithIcon.js
 -> v1.23_add_languageAndIssuerToMediaAuthorizations.js
 -> v1.23_add_lastEditDate_to_media_usages.js
 -> v1.23_removeLogoRefFromMediaFamilies.js
 -> v1.23_removeUndefinedPolicyFromTAWithoutRemoteEmo.js
 -> v1.23_remove_dynamicLabelsCreatedByRoot.js
 -> v1.24_addFullNameToChargeRecord.js
 -> v1.24_fixUserGroupListOfFrontEnd.js
 -> v1.25_AddArrayInVatOfInvoiceRow.js
 -> v1.25_accountManagerMandatory.js
 -> v1.25_addOrderRefsInOrderInvoice.js
 -> v1.25_addOwnerInArrayChargeRecordAndConsumption.js
 -> v1.25_addRegisterAndClientUsedInToken.js
 -> v1.25_addVatInEMobilityOperatorsAndConsumption.js
 -> v1.25_recreateTTLindexForRequests.js
 -> v1.26_addCurrencyUnitInEMO.js
 -> v1.26_addIndexConsumptions.js
 -> v1.26_addLanguageBO.js
 -> v1.26_addTemplatePasswordGenerated.js
 -> v1.26_addVatsVatDefaultCurrencyUnitInCpo.js
 -> v1.26_copyGroupIdInGroupName.js
 -> v1.26_optimizeChargeRecordsSearch.js
 -> v1.26_updateConsumptionFixedPart.js
 -> v1.26_updateTemplateChangePwdBelib.js
 -> v1.27_1_updateFOAccountAddress.js
 -> v1.27_2_removeOtherAddressOfStdUser.js
 -> v1.27_addDeliveryAddressToMediaOrders.js
 -> v1.27_addVisualCodeForAutoGeneretedMedias.js
 -> v1.27_moveCompanyFromPersonToFOAccount.js
 -> v1.28_addChargeVariationConfig.js
 -> v1.28_addNotificationsTemplates.js
 -> v1.28_addRankToSubscriptionPack.js
 -> v1.28_createSMTPConfigThirdParties.js
 -> v1.28_modifyFrontEndConfigNotification.js
 -> v1.28_moveCategoryAndLevelNotifications.js
 -> v1.29_addCategoryIndexToI18n.js
 -> v1.30_addTwoDecimalForMediaOrderConsumption.js
 -> v1.31_CreateDirectionDetailsCollection.js
 -> v1.31_addMobileInOffers.js
 -> v1.31_addTemplateCollaboratorCreation.js
 -> v1.31_addTemplateInterruptedCharge.js
 -> v1.31_addTwoDecimalForCdr.js
 -> v1.31_addTwoDecimalForConsumptions.js
 -> v1.31_addTwoDecimalForInvoices.js
 -> v1.31_addTwoDecimalForSubscriptionDefs.js
 -> v1.31_addTwoDecimalForSubscriptionPacks.js
 -> v1.31_createIndexes.js
 -> v1.31_removeUnusedCollections.js
 -> v1.31_setCodeDefaultVisualCodeOnMediasFromFamilies.js
 -> v1.32_addFleetConfig.js
 -> v1.32_addIndexes.js
 -> v1.32_cleanMediaAuthorizations.js
 -> v1.32_renameDefaultVisualNameInMediaFamily.js
 -> v1.33_addTypeInMailTemplate.js
 -> v1.33_changeCategoryCodeEventsToList.js
 -> v1.33_createEmailTemplateConfigThirdParties.js
 -> v1.34_1_CreateVehicleSpecCollections.js
 -> v1.34_2_InsertNCModelsAndVersionsInVehicleVersions.js
 -> v1.34_3_MigrateVehicleReferences.js
 -> v1.34_addInvoiceType.js
 -> v1.34_addRatingTriggerInFoConfig.js
 -> v1.34_addTemplatesForUnauthorizedCharge.js
 -> v1.34_add_mixin.js
 -> v1.35_addDirectionConfigToFoConfig.js
 -> v1.35_deleteKindAttributFromEMO&CPO.js
 -> v1.35_updateChargeVariationWindowToPositiveValue.js
 -> v1.36_0_updateSubscriptionPacksAvailabality.js
 -> v1.36_1_deleteFleetMobileAttributsFromOffers.js
 -> v1.36_createInvoiceDynamicLabels.js
 -> v1.37_add_user_index.js
 -> v1.37_createNetworkClassificationCollection.js
 -> v1.37_deliveryPointRef_migration.js
 -> v1.37_modifyApiTokenKey.js
 -> v1.0.0_updateProject.js
 -> v1.0.1_frontEndRelation.js
 -> v1.0.1_updateBtoCPartyRoles.js
 -> v1.0.2_limitations.js
 -> v1.0.4_templates.js
 -> v1.0.6_upadtePlugIconRef.js
 -> v1.0.8_updatePersonCreateBy.js
 -> v1.1.1_vehicleMaker.js
 -> v1.2.2_updateElectricyKind.js
 -> v1.2.3_renameSupervisedId.js
 -> v1.2.3_templates.js
 -> v1.2.5_updateTemplate.js
 -> v1.2.7_add_forgotten_password_template.js
 -> v1.2.8_add_payment_template.js
 -> v1.2.9_add_otpSessionKeywords.js
 -> v1.2.9_add_remove_payment_conf_template.js
 -> v1.3.1_addIndex.js
 -> v1.4.9_addNewMediaOrderTemplate.js
 -> v1.5.1_addVehicleModel.js
 -> v1.5.1_updateSrps.js
 -> v1.7.7_allowedSubscription.js
 -> v1.7.8_addIndex.js
 -> v1.8.3_updateMedia.js
 -> v1.8.6_addUnPaidInvoiceTemplate.js
 -> v1.8.6_updateWebTemplates.js
 -> v1.8.9_addDefaultMediaVisual.js
 -> v1.9.3_addDefaultLanguage.js
 -> v1.9.3_changeRootPwd.js
 -> v1.9.3_requestsTTL.js
 -> v1.9.3_supervisorUpdateAllowed.js
 -> v1.9.3_updatePaymentOrderStatus.js
 -> v1.9.5_addIndex.js
 -> v1.9.5_addTokenTemplates.js
 -> v1.9.5_autoSuspension.js
 -> v1.9.6_updateInfraStatusReason.js
 -> v1.9.7_addIndex.js
 -> v1.9.7_addOtpAllowedUnknownStatus.js
 -> v1.9.8_updateMediaCode.js
 -> v0.12.5_updateSubscribers.js
 -> v0.13.2_updateTradeAgreementStatus.js
 -> v0.13.3_updateChargeAreaAccessibiltyType.js
 -> v0.13.3_updateCustomerAccountStatus.js
 -> v1.10.2_addPackTokenTemplate.js
 -> v1.10.4_createAccessibilityInfoI18nLabels.js
 -> v1.12.1_addPerformanceIndexes.js
 -> v1.12.3_cleanIE.js
 -> v1.12.3_eventCategoryByFO.js
 -> v1.13.2_updateSequence.js
 -> v1.13.3_addSearchCountries.js
 -> v1.13.3_resetDateOfEvents.js
 -> v1.13.4_removeGroupFromCustomerAccount.js
 -> v1.13.5_addIndex.js
 -> v1.13.5_unknownChargeAreaAllowedConfiguration.js
 -> v1.13.8_fixOrgnisationStationGroupRef.js
 -> v1.14.2_lastUsageDate.js
 -> v1.15.1_removeCredit.js
 -> v1.15.2_adTextIndex.js
 -> v1.15.2_addSubscriptionPackGroups.js
 -> v1.15.2_moveExternalAuthorizeId.js
 -> v1.15.2_renameUserVehicleMaker.js
 -> v1.15.7_addPublicMapStatusesVisibleOptionToFO.js
 -> v1.15.8_cleanTradeRelation.js
 -> v1.16.1_addIndexToEvents.js
 -> v1.16.1_updateEventOrganisationRef.js
 -> v1.16.3_updateRemoteAvailabilityAndBookableStation.js
 -> v1.16.6_fixInvoiceWithBonus.js
 -> v1.18.7_add_index.js
 -> v1.18.8_add_index.js
 -> v1.19.2_addIndex.js
 -> v1.19.3_fixCDR.js
 -> v1.19.9_edit_invoice_ID_separator.js
 -> v1.2.10_reminder_templates.js
 -> v1.2.11_cbmp-814-add.js
 -> v1.2.11_cbmp-814-remove.js
 -> v1.2.12_update_suspended_account_template.js
 -> v1.2.13_add_fo_in_template_name.js
 -> v1.21.4_addMobileConfigToFO.js
 -> v1.22.3_add_payment_conf_removed_by_user_template.js
 -> v1.22.3_fix_cancel_status_invoice.js
 -> v1.22.5_addOtpTypeInConsumption.js
 -> v1.22.6_add_databaseIndexes.js
 -> v1.22.6_delete_databaseIndexes.js
 -> v1.23.2_deleteMediaAuthorizations.js
 -> v1.24.1_addCustomerNameInInvoice.js
 -> v1.24.1_deleteAddressInAccount.js
 -> v1.24.1_setSubscriptionPackFixPrice.js
 -> v1.24.2_setInvoiceRefToMediaOrder.js
 -> v1.25.6_addIndex.js
 -> v1.26.2_addCurrencyInEmoCpo.js
 -> v1.26.3_addCDRPublicCode.js
 -> v1.26.6_addMediaExportIndexes.js
 -> v1.27.1_removeBillingPeriod.js
 -> v1.27.2_addCompanyNameToMediaOrders.js
 -> v1.27.3_PROD_OUESTCHARGE_addNewMediaCodeHashToMedias.js
 -> v1.27.3_addCompanyNameInFoAccount.js
 -> v1.27.3_removeNetworkInStaticNameChargeAreas.js
 -> v1.27.4_addIndexConsumptionsInvoice.js
 -> v1.28.1_addNewTriggersInFrontEndConfig.js
 -> v1.28.1_addSuspendedTemplate.js
 -> v1.28.6_addOptionsSubscriptionTemplate.js
 -> v1.28.6_addTriggerInPersons.js
 -> v1.29.3_addSubscriptionDatesToSubscriptionPack.js
 -> v1.29.4_updateSubscriptionPacksMediaList.js
 -> v1.29.5_1_changeSubcriptionPacksGroupRefToOrderedGroupRef.js
 -> v1.29.5_2_removeSubscriptionPacksRank.js
 -> v1.29.6_addNewTriggersInFrontEndConfig.js
 -> v1.29.6_addTriggerInPersons.js
 -> v1.29.8_setFleetPropertiesForOffer.js
 -> v1.30.1_renameUnsedCollections.js
 -> v1.30.2_removeAccountSuspendedOnInvoice.js
 -> v1.30.4_AddOneDecimalToMediaOrder.js
 -> v1.30.4_modify_FamilyType_ADP.js
 -> v1.30.5_addMediaCountToMediaFamily.js
 -> v1.30.6_modify_pattern.js
 -> v1.31.1_add_task_user.js
 -> v1.31.4_fixCustomerAccountPaymentConfig.js
 -> v1.31.4_fixTemplateInterruptedCharge.js
 -> v1.32.4_addFrontAppVersion.js
 -> v1.34.1_Fix_MigrateVehicleReferences.js
 -> v1.34.6_fix_sdec_hex.js
 -> v1.37.6_fixVehicleVersionPlugTypo.js
 -> v1.4.12_updateOtpkeywordId.js
 -> v1.7.10_cleanChargeAreas.js
 -> v1.7.14_addCountry.js
 -> v1.7.14_addTemplates.js
 -> v1.7.14_changeNotificationChannel.js
 -> v1.7.17_addTemplates.js
 -> v1.7.20_fixMpmAlias.js
 -> v1.7.21_updateMediaOrderStatus.js
 -> v1.8.10_updateDefaultMediaVisual.js
 -> v1.8.10_updateOtpMediaFamily.js
 -> v1.13.14_fixPlugChargeMode.js
 -> v1.13.16_createIndex.js
 -> v1.13.16_fixCPOI18nLabels.js
 -> v1.13.16_removeCPOI18nLabels.js
 -> v1.13.17_fixCharge.js
 -> v1.15.13_cleanrBelibData.js
 -> v1.28.10_forceTrueNotificationTriggerFleet.js
 -> v1.28.10_modifyTemplatesInvoice.js
 -> v1.28.12_addTradeAgreementListToUpdate.js
 -> v1.30.10_get_mandate_key.js
 -> v1.15.7.1_activePaymentContext.js
 -> v1.15.7.1_addPackCloseDate.js
 -> v1.15.7.1_addVehicleInformationsFormVisibleOptionToFO.js
 -> v1.15.7.3_addIndex.js
 -> v1.15.7.3_updateManagedAttribute.js
 -> v1.32.0.4_setSubscriptionPackEntryCost.js
 -> v1.32.0.5_addIndexes.js
 -> v1.34.0.1_modifyTemplatesForUnauthorizedCharge.js
 -> v1.34.0.3_add_ttl_index_on_apiTokens.js
 -> v1.34.7.8_add_customerAccount_index.js
 -> v1.36.0.5_add_customerAccount_index_on_status.js
 -> v1.36.0.5_updateTemplateCollaboratorCreation.js
 -> v1.36.0.6_createInvoiceDynamicLabels.js
 -> v1.36.0.7_add_index_on_consumption.js
 -> v1.36.0.7_add_media_index_on_status.js
 -> v1.36.0.7_add_user_group_in_charge_consumption.js
 -> v1.36.1.2_add_empty_defaultTemplateGroups_to_operators.js
 -> v1.38.0.5_createChargeRecordIndex.js
 -> v1.7.16.1_updateCountry.js
 -> v1.30.10.2_fixMediaUsageForRoamingMedia.js

New sorter strategy

Create a strategy that would sort scripts the following identifiers in the given order.

v0.12.5
v1.3
v1.3.1
v1.32
v1.32.1

Can't declare tag with multiple globMatchers with CLI

./bin/cli --db-type mongo --mongo-uri mongodb://localhost:27017/my-db update-db --path my-path --identifier-regex "(.*?)_.*" --execution-mode DRY --tag ignore=[absolute-path-to-script1;absolute-path-to-script2] --blacklisted-tags ignore

-->

bash absolute-path-to-script2]: No such file or directory

Config to mark all as executed at first run

Right now, when you setup Datamaintain on a project that already has scripts, you have to use the CLI. Of course, if there are scripts that you want to be run by Datamaintain and others you don't, the CLI should be used to mark the scripts wanted as executed.
When you just want to mark all the scripts as executed at the first run of Datamaintain, you still have to run the CLI. It could be easier to just set that in the configuration and let Datamaintain to the job for you.
I would like your opinions @nroulon @driccio @mrenou about that idea.

Can't declare tags using a tilde (~)

I want to declare a tag using the CLI and then blacklist it to ignore a script from my execution but it seems that my script is not ignored.

./bin/cli --db-type mongo --mongo-uri mongodb://localhost:27017/my-db update-db --path my-path --identifier-regex "(.*?)_.*" --execution-mode DRY --tag ignore=[path-to-script1] --blacklisted-tags ignore

Refactor ByCaseInsensitiveSeparatorFreeAlphabeticalSortingStrategy

Class concerned: ByCaseInsensitiveSeparatorFreeAlphabeticalSortingStrategy

The use of a for with several break could be replaced by a first while and then a series of checks.
See the linked pull request for more information about the use case and comments that were previously made on the code: #77

Checksum file changed but filename did not

When a new checksum is found, check the name of the file. If it has the same name than a script already executed, update the checksum in the database.
Maybe also do not do not execute it.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.