migrations/Version20240806092312.php line 1

Open in your IDE?
  1. <?php
  2. declare(strict_types=1);
  3. namespace DoctrineMigrations;
  4. use Doctrine\DBAL\Schema\Schema;
  5. use Doctrine\Migrations\AbstractMigration;
  6. /**
  7.  * Auto-generated Migration: Please modify to your needs!
  8.  */
  9. final class Version20240806092312 extends AbstractMigration
  10. {
  11.     public function getDescription(): string
  12.     {
  13.         return '';
  14.     }
  15.     public function up(Schema $schema): void
  16.     {
  17.         // this up() migration is auto-generated, please modify it to your needs
  18.         $this->addSql('ALTER TABLE company ADD checkbox_enabled TINYINT(1) DEFAULT 0 NOT NULL, ADD checkbox_login LONGTEXT DEFAULT NULL, ADD checkbox_pass LONGTEXT DEFAULT NULL, ADD checkbox_secret LONGTEXT DEFAULT NULL');
  19.         $this->addSql("
  20.             INSERT INTO `cron_job` (`name`, `command`, `schedule`, `description`, `enabled`)
  21.             VALUES
  22.                 ('app:checkbox-shift-init', 'app:checkbox-shift-init','*/30 * * * *', 'Check shift on checkbox', 1);
  23.            ");
  24.         $this->addSql("
  25.             INSERT INTO `cron_job` (`name`, `command`, `schedule`, `description`, `enabled`)
  26.             VALUES
  27.                 ('app:checkbox-shift-init --force', 'app:checkbox-shift-init --force','0 3 * * *', 'Check shift on checkbox with close old shift', 1);
  28.            ");
  29.     }
  30.     public function down(Schema $schema): void
  31.     {
  32.         // this down() migration is auto-generated, please modify it to your needs
  33.         $this->addSql('ALTER TABLE company DROP checkbox_enabled, DROP checkbox_login, DROP checkbox_pass, DROP checkbox_secret');
  34.     }
  35. }