migrations/Version20260725124042.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 Version20260725124042 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 furious_company (id INT AUTO_INCREMENT NOT NULL, source_id VARCHAR(64) NOT NULL, furious_id INT DEFAULT NULL, name VARCHAR(255) NOT NULL, category VARCHAR(64) NOT NULL, legal_status VARCHAR(64) DEFAULT NULL, siren VARCHAR(9) DEFAULT NULL, siret VARCHAR(14) DEFAULT NULL, siren_suffixe VARCHAR(5) DEFAULT NULL, ape VARCHAR(8) DEFAULT NULL, tva_intra VARCHAR(20) DEFAULT NULL, address VARCHAR(255) DEFAULT NULL, address2 VARCHAR(255) DEFAULT NULL, zipcode VARCHAR(16) DEFAULT NULL, city VARCHAR(191) DEFAULT NULL, country VARCHAR(2) DEFAULT NULL, phone VARCHAR(32) DEFAULT NULL, fax VARCHAR(32) DEFAULT NULL, iban VARCHAR(34) DEFAULT NULL, bic VARCHAR(11) DEFAULT NULL, exact_id VARCHAR(64) DEFAULT NULL, exact_id_by_entity LONGTEXT DEFAULT NULL COMMENT \'(DC2Type:json)\', exact_comptable VARCHAR(64) DEFAULT NULL, exact_comptable_by_entity LONGTEXT DEFAULT NULL COMMENT \'(DC2Type:json)\', exact_produit VARCHAR(64) DEFAULT NULL, exact_produit_by_entity LONGTEXT DEFAULT NULL COMMENT \'(DC2Type:json)\', bank INT DEFAULT NULL, bank_by_entity LONGTEXT DEFAULT NULL COMMENT \'(DC2Type:json)\', echeance_fin_mois TINYINT(1) DEFAULT NULL, nda TINYINT(1) DEFAULT NULL, export_taxe TINYINT(1) DEFAULT NULL, echeance TINYINT(1) DEFAULT NULL, url VARCHAR(255) DEFAULT NULL, secteur_activite VARCHAR(191) DEFAULT NULL, main_client_id INT DEFAULT NULL, assign_to LONGTEXT DEFAULT NULL COMMENT \'(DC2Type:json)\', tags LONGTEXT DEFAULT NULL COMMENT \'(DC2Type:json)\', created_at DATE DEFAULT NULL COMMENT \'(DC2Type:date_immutable)\', default_vat_rate DOUBLE PRECISION DEFAULT NULL, default_vat_rate_by_entity LONGTEXT DEFAULT NULL COMMENT \'(DC2Type:json)\', paiement_mode VARCHAR(64) DEFAULT NULL, custom_fields LONGTEXT DEFAULT NULL COMMENT \'(DC2Type:json)\', UNIQUE INDEX uniq_furious_company_source (source_id), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB');
  19.         $this->addSql('ALTER TABLE furious_crm_client ADD furious_id INT DEFAULT NULL');
  20.         $this->addSql('ALTER TABLE furious_crm_fournisseur ADD furious_id INT DEFAULT NULL');
  21.         $this->addSql('ALTER TABLE furious_crm_intermittent ADD furious_id INT DEFAULT NULL');
  22.         $this->addSql('ALTER TABLE furious_user ADD furious_id INT DEFAULT NULL');
  23.     }
  24.     public function down(Schema $schema): void
  25.     {
  26.         // this down() migration is auto-generated, please modify it to your needs
  27.         $this->addSql('DROP TABLE furious_company');
  28.         $this->addSql('ALTER TABLE furious_crm_client DROP furious_id');
  29.         $this->addSql('ALTER TABLE furious_crm_fournisseur DROP furious_id');
  30.         $this->addSql('ALTER TABLE furious_crm_intermittent DROP furious_id');
  31.         $this->addSql('ALTER TABLE furious_user DROP furious_id');
  32.     }
  33. }