Skip to content

Commit

Permalink
Updates existing migration to address read-only scenario
Browse files Browse the repository at this point in the history
  • Loading branch information
BenParizek committed May 24, 2024
1 parent d8ea0ad commit 3d82820
Show file tree
Hide file tree
Showing 11 changed files with 36 additions and 6 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG/CHANGELOG-META.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# Changelog

## 4.2.5 - 2024-05-24

### Fixed

- Fixed migration issue when read-only mode enabled

## 4.2.4 - 2024-05-18

### Added
Expand Down
6 changes: 6 additions & 0 deletions CHANGELOG/CHANGELOG-REDIRECTS.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# Changelog

## 4.2.5 - 2024-05-24

### Fixed

- Fixed migration issue when read-only mode enabled

## 4.2.4 - 2024-05-18

### Added
Expand Down
6 changes: 6 additions & 0 deletions CHANGELOG/CHANGELOG-SENT-EMAIL.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# Changelog

## 4.2.5 - 2024-05-24

### Fixed

- Fixed migration issue when read-only mode enabled

## 4.2.4 - 2024-05-18

### Fixed
Expand Down
6 changes: 6 additions & 0 deletions CHANGELOG/CHANGELOG-SITEMAPS.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# Changelog

## 4.2.5 - 2024-05-24

### Fixed

- Fixed migration issue when read-only mode enabled

## 4.2.5 - 2024-05-18

### Fixed
Expand Down
6 changes: 6 additions & 0 deletions CHANGELOG/CHANGELOG-TRANSACTIONAL.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# Changelog

## 4.2.5 - 2024-05-24

### Fixed

- Fixed migration issue when read-only mode enabled

## 4.2.4 - 2024-05-18

### Fixed
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ public function safeUp(): void

$keyExists = Craft::$app->getProjectConfig()->get($moduleSettingsKey);

if ($keyExists) {
if (!$keyExists) {
// @todo - fix default settings to import
Craft::$app->getProjectConfig()->set($moduleSettingsKey, [
'defaultSidebarTab' => 'submissions',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ public function safeUp(): void

$keyExists = Craft::$app->getProjectConfig()->get($moduleSettingsKey);

if ($keyExists) {
if (!$keyExists) {
Craft::$app->getProjectConfig()->set($moduleSettingsKey, [
'renderMetadata' => true,
'maxMetaDescriptionLength' => 160,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ public function safeUp(): void

$keyExists = Craft::$app->getProjectConfig()->get($moduleSettingsKey);

if ($keyExists) {
if (!$keyExists) {
Craft::$app->getProjectConfig()->set($moduleSettingsKey, [
'matchDefinition' => self::URL_WITHOUT_QUERY_STRINGS,
'queryStringStrategy' => self::REMOVE_QUERY_STRINGS,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ public function safeUp(): void

$keyExists = Craft::$app->getProjectConfig()->get($moduleSettingsKey);

if ($keyExists) {
if (!$keyExists) {
Craft::$app->getProjectConfig()->set($moduleSettingsKey, [
'sentEmailsLimit' => 2500,
'cleanupProbability' => 1000,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ public function safeUp(): void

$keyExists = Craft::$app->getProjectConfig()->get($moduleSettingsKey);

if ($keyExists) {
if (!$keyExists) {
Craft::$app->getProjectConfig()->set($moduleSettingsKey, [
'enableContentQuerySitemaps' => false,
'enableCustomPagesSitemap' => false,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ public function safeUp(): void

$keyExists = Craft::$app->getProjectConfig()->get($coreModuleSettingsKey);

if ($keyExists) {
if (!$keyExists) {
Craft::$app->getProjectConfig()->set($coreModuleSettingsKey, [
'enabled' => true,
]);
Expand Down

0 comments on commit 3d82820

Please sign in to comment.