<?php
declare(strict_types=1);
namespace Boldr\Cms\JobsBundle\Migrations;
use Doctrine\DBAL\Schema\Schema;
use Boldr\Cms\CmsBundle\BoldrCmsMigration;
final class Version0_Install extends BoldrCmsMigration
{
public function getBundle(): string { return 'boldr/jobs-bundle'; }
public function getVersion(): ?string { return null; }
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 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');
$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');
$this->addSql('ALTER TABLE jobs_job_offer_translation ADD CONSTRAINT FK_F33B5A893481D195 FOREIGN KEY (job_offer_id) REFERENCES jobs_job_offer (id)');
}
}