chore: 🗃️ modify migration scripts to overwrite (#681)
This commit is contained in:
parent
37e50db29c
commit
1405deaf66
2 changed files with 17 additions and 14 deletions
|
@ -27,12 +27,14 @@ export class TaxChannelsV1toV2MigrationManager {
|
||||||
this.saleorApiUrl
|
this.saleorApiUrl
|
||||||
);
|
);
|
||||||
|
|
||||||
const currentConfig = await taxChannelsManagerV2.getConfig();
|
/*
|
||||||
|
* Commenting this out, because we want to overwrite the previous migrations.
|
||||||
if (currentConfig) {
|
* const currentConfig = await taxChannelsManagerV2.getConfig();
|
||||||
this.logger.info("Migration is not necessary, we have current config.");
|
* if (currentConfig) {
|
||||||
return currentConfig;
|
* this.logger.info("Migration is not necessary, we have current config.");
|
||||||
}
|
* return currentConfig;
|
||||||
|
* }
|
||||||
|
*/
|
||||||
|
|
||||||
const previousChannelConfig = await taxChannelsManagerV1.getConfig();
|
const previousChannelConfig = await taxChannelsManagerV1.getConfig();
|
||||||
|
|
||||||
|
|
|
@ -32,14 +32,15 @@ export class TaxProvidersV1toV2MigrationManager {
|
||||||
this.saleorApiUrl
|
this.saleorApiUrl
|
||||||
);
|
);
|
||||||
|
|
||||||
const currentTaxProvidersConfig = await taxProvidersManagerV2.getConfig();
|
/*
|
||||||
|
* Commenting this out, because we want to overwrite the previous migrations.
|
||||||
if (currentTaxProvidersConfig) {
|
* const currentTaxProvidersConfig = await taxProvidersManagerV2.getConfig();
|
||||||
this.logger.info("Migration is not necessary, the config is up to date.");
|
* if (currentTaxProvidersConfig) {
|
||||||
return;
|
* this.logger.info("Migration is not necessary, the config is up to date.");
|
||||||
}
|
* return;
|
||||||
|
* }
|
||||||
this.logger.info("Current config not found.");
|
* this.logger.info("Current config not found.");
|
||||||
|
*/
|
||||||
|
|
||||||
const previousTaxProvidersConfig = await taxProvidersManagerV1.getConfig();
|
const previousTaxProvidersConfig = await taxProvidersManagerV1.getConfig();
|
||||||
const previousChannelConfig = await taxChannelsManagerV1.getConfig();
|
const previousChannelConfig = await taxChannelsManagerV1.getConfig();
|
||||||
|
|
Loading…
Reference in a new issue