<?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 Version20210903121847 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->abortIf($this->connection->getDatabasePlatform()->getName() !== 'mysql', 'Migration can only be executed safely on \'mysql\'.');
$this->addSql('CREATE TABLE std_jobs (id INT UNSIGNED AUTO_INCREMENT NOT NULL COMMENT \'Job unique identifier\', description VARCHAR(255) DEFAULT NULL COMMENT \'Job\'\'s description\', machine_name VARCHAR(50) NOT NULL COMMENT \'Job machine name\', is_running TINYINT(1) DEFAULT \'0\' NOT NULL COMMENT \'Flag that indicates if the job is running\', is_active TINYINT(1) DEFAULT \'1\' NOT NULL COMMENT \'Flag that indicates if the job is active\', last_run_date DATETIME NOT NULL COMMENT \'Date and time the job last run\', last_run_result TINYINT(1) DEFAULT NULL COMMENT \'Last run result (1- success/ 0 - error)\', last_run_result_msg VARCHAR(255) DEFAULT NULL COMMENT \'Last run result message - used for error description\', PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci ENGINE = InnoDB');
}
public function down(Schema $schema) : void
{
// this down() migration is auto-generated, please modify it to your needs
$this->abortIf($this->connection->getDatabasePlatform()->getName() !== 'mysql', 'Migration can only be executed safely on \'mysql\'.');
$this->addSql('DROP TABLE std_jobs');
}
}