32 lines
822 B
PHP
32 lines
822 B
PHP
<?php
|
|
|
|
declare(strict_types=1);
|
|
|
|
namespace Template\Migrations\Template;
|
|
|
|
use Doctrine\DBAL\Schema\Schema;
|
|
use Doctrine\Migrations\AbstractMigration;
|
|
|
|
/**
|
|
* Auto-generated Migration: Please modify to your needs!
|
|
*/
|
|
final class Version20241130201314 extends AbstractMigration
|
|
{
|
|
public function getDescription(): string
|
|
{
|
|
return 'rename status and thermometer to reference location';
|
|
}
|
|
|
|
public function up(Schema $schema): void
|
|
{
|
|
$this->addSql("RENAME TABLE `thermometer` TO `location_thermometer`");
|
|
$this->addSql("RENAME TABLE `status` TO `location_status`");
|
|
}
|
|
|
|
public function down(Schema $schema): void
|
|
{
|
|
$this->addSql("RENAME TABLE `location_thermometer` TO `thermometer`");
|
|
$this->addSql("RENAME TABLE `location_status` TO `status`");
|
|
}
|
|
}
|