<?php
declare(strict_types=1);
namespace DoctrineMigrations;
use Doctrine\DBAL\Schema\Schema;
use Doctrine\Migrations\AbstractMigration;
/**
* Auto-generated Migration: Please modify to your needs!
*/
final class Version20251023075939 extends AbstractMigration
{
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 club1895_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_86C2445C217BBB47 (person_id), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB');
$this->addSql('CREATE TABLE club1895_registration (id INT AUTO_INCREMENT NOT NULL, profile_id INT NOT NULL, global_season_id INT NOT NULL, season_id INT DEFAULT NULL, section_id INT DEFAULT NULL, status VARCHAR(255) DEFAULT \'payment\' NOT NULL, uuid VARCHAR(255) NOT NULL, UNIQUE INDEX UNIQ_9F22C86BD17F50A6 (uuid), INDEX IDX_9F22C86BCCFA12B8 (profile_id), INDEX IDX_9F22C86B92C16A48 (global_season_id), INDEX IDX_9F22C86B4EC001D1 (season_id), INDEX IDX_9F22C86BD823E37A (section_id), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB');
$this->addSql('CREATE TABLE club1895_transaction (id INT AUTO_INCREMENT NOT NULL, registration_id INT NOT NULL, check_id INT DEFAULT NULL, wire_id INT DEFAULT NULL, amount DOUBLE PRECISION NOT NULL, amount_payed DOUBLE PRECISION NOT NULL, status VARCHAR(20) NOT NULL, comment VARCHAR(255) DEFAULT NULL, cancel_reason VARCHAR(255) DEFAULT NULL, uuid VARCHAR(255) NOT NULL, created_at DATETIME DEFAULT NULL COMMENT \'(DC2Type:datetime_immutable)\', updated_at DATETIME DEFAULT NULL COMMENT \'(DC2Type:datetime_immutable)\', type VARCHAR(255) NOT NULL, transaction_id VARCHAR(255) DEFAULT NULL, transaction_uuid VARCHAR(255) DEFAULT NULL, UNIQUE INDEX UNIQ_9AA1B3CBD17F50A6 (uuid), INDEX IDX_9AA1B3CB833D8F43 (registration_id), INDEX IDX_9AA1B3CB709385E7 (check_id), INDEX IDX_9AA1B3CB8DB2C7F5 (wire_id), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB');
$this->addSql('ALTER TABLE club1895_profile ADD CONSTRAINT FK_86C2445C217BBB47 FOREIGN KEY (person_id) REFERENCES person (id)');
$this->addSql('ALTER TABLE club1895_registration ADD CONSTRAINT FK_9F22C86BCCFA12B8 FOREIGN KEY (profile_id) REFERENCES club1895_profile (id)');
$this->addSql('ALTER TABLE club1895_registration ADD CONSTRAINT FK_9F22C86B92C16A48 FOREIGN KEY (global_season_id) REFERENCES global_season (id)');
$this->addSql('ALTER TABLE club1895_registration ADD CONSTRAINT FK_9F22C86B4EC001D1 FOREIGN KEY (season_id) REFERENCES season (id)');
$this->addSql('ALTER TABLE club1895_registration ADD CONSTRAINT FK_9F22C86BD823E37A FOREIGN KEY (section_id) REFERENCES section (id)');
$this->addSql('ALTER TABLE club1895_transaction ADD CONSTRAINT FK_9AA1B3CB833D8F43 FOREIGN KEY (registration_id) REFERENCES club1895_registration (id)');
$this->addSql('ALTER TABLE club1895_transaction ADD CONSTRAINT FK_9AA1B3CB709385E7 FOREIGN KEY (check_id) REFERENCES payment_check (id)');
$this->addSql('ALTER TABLE club1895_transaction ADD CONSTRAINT FK_9AA1B3CB8DB2C7F5 FOREIGN KEY (wire_id) REFERENCES payment_wire (id)');
$this->addSql('ALTER TABLE club18975_profile DROP FOREIGN KEY FK_CAC205D5217BBB47');
$this->addSql('DROP TABLE club18975_profile');
}
public function down(Schema $schema): void
{
// this down() migration is auto-generated, please modify it to your needs
$this->addSql('CREATE TABLE club18975_profile (id INT AUTO_INCREMENT NOT NULL, person_id INT NOT NULL, email VARCHAR(255) CHARACTER SET utf8mb4 NOT NULL COLLATE `utf8mb4_unicode_ci`, phone VARCHAR(40) CHARACTER SET utf8mb4 DEFAULT NULL COLLATE `utf8mb4_unicode_ci`, company VARCHAR(255) CHARACTER SET utf8mb4 NOT NULL COLLATE `utf8mb4_unicode_ci`, job_title VARCHAR(255) CHARACTER SET utf8mb4 NOT NULL COLLATE `utf8mb4_unicode_ci`, years_of_experience SMALLINT NOT NULL, presentation LONGTEXT CHARACTER SET utf8mb4 NOT NULL COLLATE `utf8mb4_unicode_ci`, offer LONGTEXT CHARACTER SET utf8mb4 DEFAULT NULL COLLATE `utf8mb4_unicode_ci`, linkedin_url VARCHAR(255) CHARACTER SET utf8mb4 DEFAULT NULL COLLATE `utf8mb4_unicode_ci`, website_url VARCHAR(255) CHARACTER SET utf8mb4 DEFAULT NULL COLLATE `utf8mb4_unicode_ci`, calendar_url VARCHAR(255) CHARACTER SET utf8mb4 DEFAULT NULL COLLATE `utf8mb4_unicode_ci`, address_number VARCHAR(15) CHARACTER SET utf8mb4 DEFAULT NULL COLLATE `utf8mb4_unicode_ci`, address_street VARCHAR(100) CHARACTER SET utf8mb4 DEFAULT NULL COLLATE `utf8mb4_unicode_ci`, address_street_type VARCHAR(15) CHARACTER SET utf8mb4 DEFAULT NULL COLLATE `utf8mb4_unicode_ci`, address_postal_code VARCHAR(5) CHARACTER SET utf8mb4 DEFAULT NULL COLLATE `utf8mb4_unicode_ci`, address_city VARCHAR(100) CHARACTER SET utf8mb4 DEFAULT NULL COLLATE `utf8mb4_unicode_ci`, address_additional VARCHAR(255) CHARACTER SET utf8mb4 DEFAULT NULL COLLATE `utf8mb4_unicode_ci`, 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 COMMENT = \'\' ');
$this->addSql('ALTER TABLE club18975_profile ADD CONSTRAINT FK_CAC205D5217BBB47 FOREIGN KEY (person_id) REFERENCES person (id)');
$this->addSql('ALTER TABLE club1895_profile DROP FOREIGN KEY FK_86C2445C217BBB47');
$this->addSql('ALTER TABLE club1895_registration DROP FOREIGN KEY FK_9F22C86BCCFA12B8');
$this->addSql('ALTER TABLE club1895_registration DROP FOREIGN KEY FK_9F22C86B92C16A48');
$this->addSql('ALTER TABLE club1895_registration DROP FOREIGN KEY FK_9F22C86B4EC001D1');
$this->addSql('ALTER TABLE club1895_registration DROP FOREIGN KEY FK_9F22C86BD823E37A');
$this->addSql('ALTER TABLE club1895_transaction DROP FOREIGN KEY FK_9AA1B3CB833D8F43');
$this->addSql('ALTER TABLE club1895_transaction DROP FOREIGN KEY FK_9AA1B3CB709385E7');
$this->addSql('ALTER TABLE club1895_transaction DROP FOREIGN KEY FK_9AA1B3CB8DB2C7F5');
$this->addSql('DROP TABLE club1895_profile');
$this->addSql('DROP TABLE club1895_registration');
$this->addSql('DROP TABLE club1895_transaction');
}
}