vendor/boldr/jobs-bundle/migrations/Version0_Install.php line 1

Open in your IDE?
  1. <?php
  2. declare(strict_types=1);
  3. namespace Boldr\Cms\JobsBundle\Migrations;
  4. use Doctrine\DBAL\Schema\Schema;
  5. use Boldr\Cms\CmsBundle\BoldrCmsMigration;
  6. final class Version0_Install extends BoldrCmsMigration
  7. {
  8.     public function getBundle(): string { return 'boldr/jobs-bundle'; }
  9.     public function getVersion(): ?string { return null; }
  10.     public function getDescription(): string
  11.     {
  12.         return '';
  13.     }
  14.     public function up(Schema $schema): void
  15.     {
  16.         // this up() migration is auto-generated, please modify it to your needs
  17.         $this->addSql('CREATE TABLE jobs_job_offer (id INT UNSIGNED AUTO_INCREMENT NOT NULL, min_hours INT UNSIGNED NOT NULL, max_hours INT UNSIGNED NOT NULL, sort_order INT UNSIGNED DEFAULT 0 NOT NULL, enabled TINYINT(1) DEFAULT \'1\' NOT NULL, PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB');
  18.         $this->addSql('CREATE TABLE jobs_job_offer_translation (id INT UNSIGNED AUTO_INCREMENT NOT NULL, job_offer_id INT UNSIGNED NOT NULL, locale VARCHAR(10) NOT NULL, title VARCHAR(255) NOT NULL, permalink VARCHAR(255) NOT NULL, content_elements LONGTEXT NOT NULL COMMENT \'(DC2Type:array)\', requirements JSON NOT NULL, INDEX IDX_F33B5A893481D195 (job_offer_id), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB');
  19.         $this->addSql('ALTER TABLE jobs_job_offer_translation ADD CONSTRAINT FK_F33B5A893481D195 FOREIGN KEY (job_offer_id) REFERENCES jobs_job_offer (id)');
  20.     }
  21. }