src/Migrations/Version20210420073827.php line 1
<?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 Version20210420073827 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('CREATE TABLE message_sms (id INT AUTO_INCREMENT NOT NULL, phone VARCHAR(255) NOT NULL, text VARCHAR(255) DEFAULT NULL, sms_id INT NOT NULL, status VARCHAR(255) NOT NULL, created_at DATETIME DEFAULT CURRENT_TIMESTAMP NOT NULL, updated_at DATETIME DEFAULT CURRENT_TIMESTAMP NOT NULL, PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB');
$this->addSql('ALTER TABLE olymp_online_participant ADD canceled_by_id INT DEFAULT NULL, ADD canceled TINYINT(1) DEFAULT \'0\' NOT NULL, ADD canceled_at DATETIME DEFAULT NULL, DROP active');
$this->addSql('ALTER TABLE olymp_online_participant ADD CONSTRAINT FK_EC8114171418957 FOREIGN KEY (canceled_by_id) REFERENCES users (id)');
$this->addSql('CREATE INDEX IDX_EC8114171418957 ON olymp_online_participant (canceled_by_id)');
}
public function down(Schema $schema): void
{
// this down() migration is auto-generated, please modify it to your needs
$this->addSql('DROP TABLE message_sms');
$this->addSql('ALTER TABLE olymp_online_participant DROP FOREIGN KEY FK_EC8114171418957');
$this->addSql('DROP INDEX IDX_EC8114171418957 ON olymp_online_participant');
$this->addSql('ALTER TABLE olymp_online_participant ADD active TINYINT(1) DEFAULT \'1\' NOT NULL, DROP canceled_by_id, DROP canceled, DROP canceled_at');
}
}