Skip to content

Commit

Permalink
pkp#8598 Migrate default values from en_US to en
Browse files Browse the repository at this point in the history
  • Loading branch information
defstat committed Feb 14, 2023
1 parent 74f8eaa commit d65f253
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions classes/migration/upgrade/v3_4_0/MergeLocalesMigration.php
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,10 @@ public function up(): void
$this->updateArrayLocaleNoId($site->supported_locales, 'site', 'supported_locales');
$this->updateArrayLocaleNoId($site->installed_locales, 'site', 'installed_locales');
$this->updateSingleValueLocaleNoId($site->primary_locale, 'site', 'primary_locale');

Schema::table('site', function (Blueprint $table) {
$table->string('installed_locales')->default('en')->change();
});

// users
$users = DB::table('users')
Expand All @@ -139,6 +143,10 @@ public function up(): void
$this->updateSingleValueLocaleEmailData($emailTemplatesDefaultDataCurrent->locale, 'email_templates_default_data', $emailTemplatesDefaultDataCurrent->email_key, $emailTemplatesDefaultData);
}

Schema::table('email_templates_default_data', function (Blueprint $table) {
$table->string('locale')->default('en')->change();
});

// Context
$contexts = DB::table($this->CONTEXT_TABLE)
->get();
Expand Down

0 comments on commit d65f253

Please sign in to comment.