<?php
declare(strict_types=1);
namespace DoctrineMigrations;
use Doctrine\DBAL\Schema\Schema;
use Doctrine\Migrations\AbstractMigration;
/**
* Auto-generated Migration: Please modify to your needs!
*/
final class Version20220823064249 extends AbstractMigration
{
public function getDescription(): string
{
return '';
}
public function up(Schema $schema): void
{
// this up() migration is auto-generated, please modify it to your needs
$this->addSql('ALTER TABLE static_field_formats ADD swagger_name VARCHAR(50) DEFAULT NULL');
$this->addSql('UPDATE static_fields SET `name` = :name, `swagger_name` = :swagger_name WHERE id=8', array('name'=> 'long', 'swagger_name' => 'integer'));
$this->addSql('INSERT INTO static_fields (`name`, `swagger_name`) VALUES (?,?)', array('float', 'number'));
$this->addSql('DELETE from static_field_formats');
$this->addSql('INSERT INTO static_field_formats (static_field_id, name, swagger_name) VALUES (?, ?, ?)', array(7, 'datetime', 'date-time'));
$this->addSql('INSERT INTO static_field_formats (static_field_id, name, swagger_name) VALUES (?, ?, ?)', array(7, 'date', 'date'));
$this->addSql('INSERT INTO static_field_formats (static_field_id, name, swagger_name) VALUES (?, ?, ?)', array(8, 'long', 'int64'));
$this->addSql('INSERT INTO static_field_formats (static_field_id, name, swagger_name) VALUES (?, ?, ?)', array(9, 'float', 'float'));
}
public function down(Schema $schema): void
{
// this down() migration is auto-generated, please modify it to your needs
$this->addSql('ALTER TABLE static_field_formats DROP swagger_name');
}
}