migrations/Version20230803092500.php line 1

  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 Version20230803092500 extends AbstractMigration
  10. {
  11.     public function getDescription(): string
  12.     {
  13.         return 'add sale_upwork_bid';
  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 sale_upwork_bid (id INT AUTO_INCREMENT NOT NULL, developer_id INT DEFAULT NULL, name VARCHAR(255) NOT NULL, link VARCHAR(510) NOT NULL, rating SMALLINT DEFAULT NULL, date DATETIME NOT NULL, description LONGTEXT NOT NULL, answer LONGTEXT NOT NULL, status VARCHAR(255) DEFAULT \'VERIFY\' NOT NULL, skills LONGTEXT NOT NULL COMMENT \'(DC2Type:json)\', hourly VARCHAR(100) DEFAULT NULL, duration VARCHAR(100) DEFAULT NULL, experience_level VARCHAR(100) DEFAULT NULL, hourly_range VARCHAR(100) DEFAULT NULL, fixed_price VARCHAR(100) DEFAULT NULL, project_type VARCHAR(100) DEFAULT NULL, proposals SMALLINT NOT NULL, last_viewed_by_client DATETIME DEFAULT NULL, interviewing SMALLINT NOT NULL, invites_send SMALLINT NOT NULL, unanswered_invites SMALLINT NOT NULL, INDEX IDX_ABA33A3D64DD9267 (developer_id), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8 COLLATE `utf8_unicode_ci` ENGINE = InnoDB');
  19.         $this->addSql('ALTER TABLE sale_upwork_bid ADD CONSTRAINT FK_ABA33A3D64DD9267 FOREIGN KEY (developer_id) REFERENCES sale_upwork_developer (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('ALTER TABLE sale_upwork_bid DROP FOREIGN KEY FK_ABA33A3D64DD9267');
  25.         $this->addSql('DROP TABLE sale_upwork_bid');
  26.     }
  27. }