migrations/Version20220118124448.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 Version20220118124448 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('CREATE TABLE offer (id INT AUTO_INCREMENT NOT NULL, society_id INT NOT NULL, title VARCHAR(191) NOT NULL, min_tjm INT DEFAULT NULL, max_tjm INT DEFAULT NULL, open_society TINYINT(1) NOT NULL, location VARCHAR(191) NOT NULL, description LONGTEXT NOT NULL, duration_value INT NOT NULL, duration_type VARCHAR(191) NOT NULL, mode_remote VARCHAR(191) NOT NULL, year_required VARCHAR(191) NOT NULL, show_coordinate TINYINT(1) DEFAULT NULL, INDEX IDX_29D6873EE6389D24 (society_id), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB');
  19.         $this->addSql('ALTER TABLE offer ADD CONSTRAINT FK_29D6873EE6389D24 FOREIGN KEY (society_id) REFERENCES society (id)');
  20.     }
  21.     public function down(Schema $schema): void
  22.     {
  23.         // this down() migration is auto-generated, please modify it to your needs
  24.         $this->addSql('DROP TABLE offer');
  25.     }
  26. }