migrations/Version20250528135147.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 Version20250528135147 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 club18975_profile (id INT AUTO_INCREMENT NOT NULL, person_id INT NOT NULL, email VARCHAR(255) NOT NULL, phone VARCHAR(40) DEFAULT NULL, company VARCHAR(255) NOT NULL, job_title VARCHAR(255) NOT NULL, years_of_experience SMALLINT NOT NULL, presentation LONGTEXT NOT NULL, offer LONGTEXT DEFAULT NULL, linkedin_url VARCHAR(255) DEFAULT NULL, website_url VARCHAR(255) DEFAULT NULL, calendar_url VARCHAR(255) DEFAULT NULL, address_number VARCHAR(15) DEFAULT NULL, address_street VARCHAR(100) DEFAULT NULL, address_street_type VARCHAR(15) DEFAULT NULL, address_postal_code VARCHAR(5) DEFAULT NULL, address_city VARCHAR(100) DEFAULT NULL, address_additional VARCHAR(255) DEFAULT NULL, address_latitude DOUBLE PRECISION DEFAULT NULL, address_longitude DOUBLE PRECISION DEFAULT NULL, UNIQUE INDEX UNIQ_CAC205D5217BBB47 (person_id), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB');
  19.         $this->addSql('ALTER TABLE club18975_profile ADD CONSTRAINT FK_CAC205D5217BBB47 FOREIGN KEY (person_id) REFERENCES person (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 club18975_profile DROP FOREIGN KEY FK_CAC205D5217BBB47');
  25.         $this->addSql('DROP TABLE club18975_profile');
  26.     }
  27. }