futtern/migrations/Version20240816193410.php
lubiana 56206acd8a
All checks were successful
/ ls (pull_request) Successful in 38s
/ ls (push) Successful in 37s
/ ls (release) Successful in 25s
#37 add external link to foodvendor
2024-08-16 21:52:53 +02:00

35 lines
1.1 KiB
PHP

<?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 Version20240816193410 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 food_vendor ADD COLUMN menu_link VARCHAR(255) DEFAULT NULL');
}
public function down(Schema $schema): void
{
// this down() migration is auto-generated, please modify it to your needs
$this->addSql('CREATE TEMPORARY TABLE __temp__food_vendor AS SELECT name, id FROM food_vendor');
$this->addSql('DROP TABLE food_vendor');
$this->addSql('CREATE TABLE food_vendor (name VARCHAR(50) NOT NULL, id BLOB NOT NULL, PRIMARY KEY(id))');
$this->addSql('INSERT INTO food_vendor (name, id) SELECT name, id FROM __temp__food_vendor');
$this->addSql('DROP TABLE __temp__food_vendor');
}
}