Migration: Remove last remnants of the settings_current table name (now using settings) in the migration process

pull/5641/head
Yannick Warnier 1 year ago
parent f2c90bda64
commit 0676c751be
  1. 6
      src/CoreBundle/Migrations/Schema/V200/Version20.php
  2. 2
      src/CoreBundle/Migrations/Schema/V200/Version20230720143000.php

@ -143,8 +143,8 @@ class Version20 extends AbstractMigrationChamilo
$this->addSql('UPDATE ticket_message SET subject = "Ticket #"+ id WHERE subject IS NULL');
$this->addSql('ALTER TABLE ticket_message CHANGE subject subject VARCHAR(255) NOT NULL');
$this->addSql('UPDATE settings_current SET variable = "No name" WHERE variable IS NULL');
$this->addSql('ALTER TABLE settings_current CHANGE variable variable VARCHAR(190) NOT NULL;');
$this->addSql('UPDATE settings SET variable = "No name" WHERE variable IS NULL');
$this->addSql('ALTER TABLE settings CHANGE variable variable VARCHAR(190) NOT NULL;');
// Global tool.
if (false === $schema->hasTable('tool')) {
@ -215,7 +215,7 @@ class Version20 extends AbstractMigrationChamilo
");
$this->addSql("
UPDATE settings_current
UPDATE settings
SET selected_value = COALESCE((
SELECT isocode
FROM language

@ -34,7 +34,7 @@ final class Version20230720143000 extends AbstractMigrationChamilo
$path = "users/{$id}/";
$variable = 'split_users_upload_directory';
// Query the 'selected_value' from the 'settings_current' table where the 'variable' is 'split_users_upload_directory'
// Query the 'selected_value' from the 'settings' table where the 'variable' is 'split_users_upload_directory'
$query = $this->entityManager->createQuery('SELECT s.selectedValue FROM Chamilo\CoreBundle\Entity\SettingsCurrent s WHERE s.variable = :variable')
->setParameter('variable', $variable)
;

Loading…
Cancel
Save