No puede seleccionar más de 25 temas Los temas deben comenzar con una letra o número, pueden incluir guiones ('-') y pueden tener hasta 35 caracteres de largo.

98 líneas
8.3KB

  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 Version20211007131528 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('ALTER TABLE dream DROP FOREIGN KEY FK_6A5F004F2395FCED');
  19. $this->addSql('ALTER TABLE dream DROP FOREIGN KEY FK_6A5F004F6C159F58');
  20. $this->addSql('ALTER TABLE dream DROP FOREIGN KEY FK_6A5F004FE2920B1');
  21. $this->addSql('DROP INDEX IDX_6A5F004F6C159F58 ON dream');
  22. $this->addSql('DROP INDEX IDX_6A5F004FE2920B1 ON dream');
  23. $this->addSql('DROP INDEX IDX_6A5F004F2395FCED ON dream');
  24. $this->addSql('ALTER TABLE dream DROP individual_data_id, DROP thematic_id, DROP subthematic_id, DROP description');
  25. $this->addSql('ALTER TABLE individual_data DROP firstname, DROP lastname, DROP email, DROP intro_question, DROP intro_answer');
  26. $this->addSql('ALTER TABLE project_boost DROP FOREIGN KEY FK_45312EF62395FCED');
  27. $this->addSql('ALTER TABLE project_boost DROP FOREIGN KEY FK_45312EF66C159F58');
  28. $this->addSql('ALTER TABLE project_boost DROP FOREIGN KEY FK_45312EF6E2920B1');
  29. $this->addSql('DROP INDEX IDX_45312EF66C159F58 ON project_boost');
  30. $this->addSql('DROP INDEX IDX_45312EF6E2920B1 ON project_boost');
  31. $this->addSql('DROP INDEX IDX_45312EF62395FCED ON project_boost');
  32. $this->addSql('ALTER TABLE project_boost DROP individual_data_id, DROP thematic_id, DROP subthematic_id, DROP description');
  33. $this->addSql('ALTER TABLE project_inspiring DROP FOREIGN KEY FK_2E8C2C2E2395FCED');
  34. $this->addSql('ALTER TABLE project_inspiring DROP FOREIGN KEY FK_2E8C2C2E6C159F58');
  35. $this->addSql('ALTER TABLE project_inspiring DROP FOREIGN KEY FK_2E8C2C2EE2920B1');
  36. $this->addSql('DROP INDEX IDX_2E8C2C2E6C159F58 ON project_inspiring');
  37. $this->addSql('DROP INDEX IDX_2E8C2C2EE2920B1 ON project_inspiring');
  38. $this->addSql('DROP INDEX IDX_2E8C2C2E2395FCED ON project_inspiring');
  39. $this->addSql('ALTER TABLE project_inspiring DROP individual_data_id, DROP thematic_id, DROP subthematic_id, DROP description');
  40. $this->addSql('ALTER TABLE revolt DROP FOREIGN KEY FK_350517872395FCED');
  41. $this->addSql('ALTER TABLE revolt DROP FOREIGN KEY FK_350517876C159F58');
  42. $this->addSql('ALTER TABLE revolt DROP FOREIGN KEY FK_35051787E2920B1');
  43. $this->addSql('DROP INDEX IDX_350517876C159F58 ON revolt');
  44. $this->addSql('DROP INDEX IDX_35051787E2920B1 ON revolt');
  45. $this->addSql('DROP INDEX IDX_350517872395FCED ON revolt');
  46. $this->addSql('ALTER TABLE revolt DROP individual_data_id, DROP thematic_id, DROP subthematic_id, DROP description');
  47. $this->addSql('ALTER TABLE subthematic DROP FOREIGN KEY FK_778C62FB2395FCED');
  48. $this->addSql('DROP INDEX IDX_778C62FB2395FCED ON subthematic');
  49. $this->addSql('ALTER TABLE subthematic DROP thematic_id, DROP name');
  50. $this->addSql('ALTER TABLE territory DROP name');
  51. $this->addSql('ALTER TABLE thematic DROP name');
  52. }
  53. public function down(Schema $schema): void
  54. {
  55. // this down() migration is auto-generated, please modify it to your needs
  56. $this->addSql('ALTER TABLE dream ADD individual_data_id INT DEFAULT NULL, ADD thematic_id INT DEFAULT NULL, ADD subthematic_id INT DEFAULT NULL, ADD description LONGTEXT CHARACTER SET utf8mb4 NOT NULL COLLATE `utf8mb4_unicode_ci`');
  57. $this->addSql('ALTER TABLE dream ADD CONSTRAINT FK_6A5F004F2395FCED FOREIGN KEY (thematic_id) REFERENCES thematic (id)');
  58. $this->addSql('ALTER TABLE dream ADD CONSTRAINT FK_6A5F004F6C159F58 FOREIGN KEY (subthematic_id) REFERENCES subthematic (id)');
  59. $this->addSql('ALTER TABLE dream ADD CONSTRAINT FK_6A5F004FE2920B1 FOREIGN KEY (individual_data_id) REFERENCES individual_data (id)');
  60. $this->addSql('CREATE INDEX IDX_6A5F004F6C159F58 ON dream (subthematic_id)');
  61. $this->addSql('CREATE INDEX IDX_6A5F004FE2920B1 ON dream (individual_data_id)');
  62. $this->addSql('CREATE INDEX IDX_6A5F004F2395FCED ON dream (thematic_id)');
  63. $this->addSql('ALTER TABLE individual_data ADD firstname VARCHAR(255) CHARACTER SET utf8mb4 DEFAULT NULL COLLATE `utf8mb4_unicode_ci`, ADD lastname VARCHAR(255) CHARACTER SET utf8mb4 DEFAULT NULL COLLATE `utf8mb4_unicode_ci`, ADD email VARCHAR(255) CHARACTER SET utf8mb4 DEFAULT NULL COLLATE `utf8mb4_unicode_ci`, ADD intro_question VARCHAR(255) CHARACTER SET utf8mb4 DEFAULT NULL COLLATE `utf8mb4_unicode_ci`, ADD intro_answer VARCHAR(255) CHARACTER SET utf8mb4 DEFAULT NULL COLLATE `utf8mb4_unicode_ci`');
  64. $this->addSql('ALTER TABLE project_boost ADD individual_data_id INT DEFAULT NULL, ADD thematic_id INT DEFAULT NULL, ADD subthematic_id INT DEFAULT NULL, ADD description LONGTEXT CHARACTER SET utf8mb4 NOT NULL COLLATE `utf8mb4_unicode_ci`');
  65. $this->addSql('ALTER TABLE project_boost ADD CONSTRAINT FK_45312EF62395FCED FOREIGN KEY (thematic_id) REFERENCES thematic (id)');
  66. $this->addSql('ALTER TABLE project_boost ADD CONSTRAINT FK_45312EF66C159F58 FOREIGN KEY (subthematic_id) REFERENCES subthematic (id)');
  67. $this->addSql('ALTER TABLE project_boost ADD CONSTRAINT FK_45312EF6E2920B1 FOREIGN KEY (individual_data_id) REFERENCES individual_data (id)');
  68. $this->addSql('CREATE INDEX IDX_45312EF66C159F58 ON project_boost (subthematic_id)');
  69. $this->addSql('CREATE INDEX IDX_45312EF6E2920B1 ON project_boost (individual_data_id)');
  70. $this->addSql('CREATE INDEX IDX_45312EF62395FCED ON project_boost (thematic_id)');
  71. $this->addSql('ALTER TABLE project_inspiring ADD individual_data_id INT DEFAULT NULL, ADD thematic_id INT DEFAULT NULL, ADD subthematic_id INT DEFAULT NULL, ADD description LONGTEXT CHARACTER SET utf8mb4 NOT NULL COLLATE `utf8mb4_unicode_ci`');
  72. $this->addSql('ALTER TABLE project_inspiring ADD CONSTRAINT FK_2E8C2C2E2395FCED FOREIGN KEY (thematic_id) REFERENCES thematic (id)');
  73. $this->addSql('ALTER TABLE project_inspiring ADD CONSTRAINT FK_2E8C2C2E6C159F58 FOREIGN KEY (subthematic_id) REFERENCES subthematic (id)');
  74. $this->addSql('ALTER TABLE project_inspiring ADD CONSTRAINT FK_2E8C2C2EE2920B1 FOREIGN KEY (individual_data_id) REFERENCES individual_data (id)');
  75. $this->addSql('CREATE INDEX IDX_2E8C2C2E6C159F58 ON project_inspiring (subthematic_id)');
  76. $this->addSql('CREATE INDEX IDX_2E8C2C2EE2920B1 ON project_inspiring (individual_data_id)');
  77. $this->addSql('CREATE INDEX IDX_2E8C2C2E2395FCED ON project_inspiring (thematic_id)');
  78. $this->addSql('ALTER TABLE revolt ADD individual_data_id INT DEFAULT NULL, ADD thematic_id INT DEFAULT NULL, ADD subthematic_id INT DEFAULT NULL, ADD description LONGTEXT CHARACTER SET utf8mb4 NOT NULL COLLATE `utf8mb4_unicode_ci`');
  79. $this->addSql('ALTER TABLE revolt ADD CONSTRAINT FK_350517872395FCED FOREIGN KEY (thematic_id) REFERENCES thematic (id)');
  80. $this->addSql('ALTER TABLE revolt ADD CONSTRAINT FK_350517876C159F58 FOREIGN KEY (subthematic_id) REFERENCES subthematic (id)');
  81. $this->addSql('ALTER TABLE revolt ADD CONSTRAINT FK_35051787E2920B1 FOREIGN KEY (individual_data_id) REFERENCES individual_data (id)');
  82. $this->addSql('CREATE INDEX IDX_350517876C159F58 ON revolt (subthematic_id)');
  83. $this->addSql('CREATE INDEX IDX_35051787E2920B1 ON revolt (individual_data_id)');
  84. $this->addSql('CREATE INDEX IDX_350517872395FCED ON revolt (thematic_id)');
  85. $this->addSql('ALTER TABLE subthematic ADD thematic_id INT DEFAULT NULL, ADD name VARCHAR(255) CHARACTER SET utf8mb4 NOT NULL COLLATE `utf8mb4_unicode_ci`');
  86. $this->addSql('ALTER TABLE subthematic ADD CONSTRAINT FK_778C62FB2395FCED FOREIGN KEY (thematic_id) REFERENCES thematic (id)');
  87. $this->addSql('CREATE INDEX IDX_778C62FB2395FCED ON subthematic (thematic_id)');
  88. $this->addSql('ALTER TABLE territory ADD name VARCHAR(255) CHARACTER SET utf8mb4 NOT NULL COLLATE `utf8mb4_unicode_ci`');
  89. $this->addSql('ALTER TABLE thematic ADD name VARCHAR(255) CHARACTER SET utf8mb4 NOT NULL COLLATE `utf8mb4_unicode_ci`');
  90. }
  91. }