<?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 Version20220627143924 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 tennant ADD user_id INT NOT NULL, ADD user_name VARCHAR(500) DEFAULT NULL, ADD ocupation VARCHAR(255) DEFAULT NULL, ADD image VARCHAR(255) DEFAULT NULL, ADD age INT DEFAULT NULL, ADD country VARCHAR(255) DEFAULT NULL, ADD social_profile LONGTEXT DEFAULT NULL COMMENT \'(DC2Type:json)\'');
$this->addSql('ALTER TABLE tennant ADD CONSTRAINT FK_C58AAEA8A76ED395 FOREIGN KEY (user_id) REFERENCES user (id)');
$this->addSql('CREATE UNIQUE INDEX UNIQ_C58AAEA8A76ED395 ON tennant (user_id)');
}
public function down(Schema $schema): void
{
// this down() migration is auto-generated, please modify it to your needs
$this->addSql('ALTER TABLE tennant DROP FOREIGN KEY FK_C58AAEA8A76ED395');
$this->addSql('DROP INDEX UNIQ_C58AAEA8A76ED395 ON tennant');
$this->addSql('ALTER TABLE tennant DROP user_id, DROP user_name, DROP ocupation, DROP image, DROP age, DROP country, DROP social_profile');
}
}