osm-labo/migrations/Version20250716160000.php
2025-07-16 17:00:09 +02:00

41 lines
No EOL
1.1 KiB
PHP

<?php
declare(strict_types=1);
namespace DoctrineMigrations;
use Doctrine\DBAL\Schema\Schema;
use Doctrine\Migrations\AbstractMigration;
/**
* Add osmObjectType and osmId fields to demande table
*/
final class Version20250716160000 extends AbstractMigration
{
public function getDescription(): string
{
return 'Add osmObjectType and osmId fields to demande table';
}
public function up(Schema $schema): void
{
// this up() migration is auto-generated, please modify it to your needs
$this->addSql(<<<'SQL'
ALTER TABLE demande ADD osm_object_type VARCHAR(10) DEFAULT NULL
SQL);
$this->addSql(<<<'SQL'
ALTER TABLE demande ADD osm_id INT DEFAULT NULL
SQL);
}
public function down(Schema $schema): void
{
// this down() migration is auto-generated, please modify it to your needs
$this->addSql(<<<'SQL'
ALTER TABLE demande DROP osm_object_type
SQL);
$this->addSql(<<<'SQL'
ALTER TABLE demande DROP osm_id
SQL);
}
}