- Add organizer fields to User entity: companyName, siret, address, postalCode, city, phone - Update RegistrationController to handle buyer and organizer registration types - Create register template with tab selector (acheteur/organisateur) - Organizer registration assigns ROLE_ORGANIZER - Add migration for new User fields Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
42 lines
1.4 KiB
PHP
42 lines
1.4 KiB
PHP
<?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 Version20260319102614 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('ALTER TABLE "user" ADD company_name VARCHAR(255) DEFAULT NULL');
|
|
$this->addSql('ALTER TABLE "user" ADD siret VARCHAR(14) DEFAULT NULL');
|
|
$this->addSql('ALTER TABLE "user" ADD address VARCHAR(255) DEFAULT NULL');
|
|
$this->addSql('ALTER TABLE "user" ADD postal_code VARCHAR(10) DEFAULT NULL');
|
|
$this->addSql('ALTER TABLE "user" ADD city VARCHAR(255) DEFAULT NULL');
|
|
$this->addSql('ALTER TABLE "user" ADD phone VARCHAR(20) DEFAULT NULL');
|
|
}
|
|
|
|
public function down(Schema $schema): void
|
|
{
|
|
// this down() migration is auto-generated, please modify it to your needs
|
|
$this->addSql('ALTER TABLE "user" DROP company_name');
|
|
$this->addSql('ALTER TABLE "user" DROP siret');
|
|
$this->addSql('ALTER TABLE "user" DROP address');
|
|
$this->addSql('ALTER TABLE "user" DROP postal_code');
|
|
$this->addSql('ALTER TABLE "user" DROP city');
|
|
$this->addSql('ALTER TABLE "user" DROP phone');
|
|
}
|
|
}
|