Migrations: Fix Unknown column 'publicated_on' in 'c_lp' - refs BT#20846

pull/4817/head
christian 2 years ago
parent 3b11338134
commit c8f4d4e82f
  1. 34
      src/CoreBundle/Migrations/Schema/V200/Version20230124123419.php

@ -1,34 +0,0 @@
<?php
declare(strict_types=1);
namespace Chamilo\CoreBundle\Migrations\Schema\V200;
use Chamilo\CoreBundle\Migrations\AbstractMigrationChamilo;
use Doctrine\DBAL\Schema\Schema;
final class Version20230124123419 extends AbstractMigrationChamilo
{
public function getDescription(): string
{
return 'Rename c_lp.publicated_on to c_lp.published_on';
}
public function up(Schema $schema): void
{
if ($schema->hasTable('c_lp')) {
$this->addSql(
'ALTER TABLE c_lp CHANGE publicated_on published_on datetime NULL;'
);
}
}
public function down(Schema $schema): void
{
if ($schema->hasTable('c_lp')) {
$this->addSql(
'ALTER TABLE c_lp CHANGE published_on publicated_on datetime NULL;'
);
}
}
}
Loading…
Cancel
Save