Вы не можете выбрать более 25 тем Темы должны начинаться с буквы или цифры, могут содержать дефисы(-) и должны содержать не более 35 символов.

60 lines
3.4KB

  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 Version20210601122627 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 collectif_data ADD status DOUBLE PRECISION NOT NULL');
  19. $this->addSql('ALTER TABLE configuration ADD dev_alias VARCHAR(255) DEFAULT NULL');
  20. $this->addSql('ALTER TABLE dreams ADD thematic_id INT DEFAULT NULL, ADD description LONGTEXT NOT NULL');
  21. $this->addSql('ALTER TABLE dreams ADD CONSTRAINT FK_FD07CC0A2395FCED FOREIGN KEY (thematic_id) REFERENCES thematic (id)');
  22. $this->addSql('CREATE INDEX IDX_FD07CC0A2395FCED ON dreams (thematic_id)');
  23. $this->addSql('ALTER TABLE individual_data ADD status DOUBLE PRECISION NOT NULL');
  24. $this->addSql('ALTER TABLE projects_boost ADD thematic_id INT DEFAULT NULL, ADD description LONGTEXT NOT NULL');
  25. $this->addSql('ALTER TABLE projects_boost ADD CONSTRAINT FK_C3E573562395FCED FOREIGN KEY (thematic_id) REFERENCES thematic (id)');
  26. $this->addSql('CREATE INDEX IDX_C3E573562395FCED ON projects_boost (thematic_id)');
  27. $this->addSql('ALTER TABLE projects_inspiring ADD thematic_id INT DEFAULT NULL, ADD description LONGTEXT NOT NULL');
  28. $this->addSql('ALTER TABLE projects_inspiring ADD CONSTRAINT FK_E60CAEC62395FCED FOREIGN KEY (thematic_id) REFERENCES thematic (id)');
  29. $this->addSql('CREATE INDEX IDX_E60CAEC62395FCED ON projects_inspiring (thematic_id)');
  30. $this->addSql('ALTER TABLE revolts ADD thematic_id INT DEFAULT NULL, ADD description LONGTEXT NOT NULL');
  31. $this->addSql('ALTER TABLE revolts ADD CONSTRAINT FK_68E7DC9F2395FCED FOREIGN KEY (thematic_id) REFERENCES thematic (id)');
  32. $this->addSql('CREATE INDEX IDX_68E7DC9F2395FCED ON revolts (thematic_id)');
  33. }
  34. public function down(Schema $schema): void
  35. {
  36. // this down() migration is auto-generated, please modify it to your needs
  37. $this->addSql('ALTER TABLE collectif_data DROP status');
  38. $this->addSql('ALTER TABLE configuration DROP dev_alias');
  39. $this->addSql('ALTER TABLE dreams DROP FOREIGN KEY FK_FD07CC0A2395FCED');
  40. $this->addSql('DROP INDEX IDX_FD07CC0A2395FCED ON dreams');
  41. $this->addSql('ALTER TABLE dreams DROP thematic_id, DROP description');
  42. $this->addSql('ALTER TABLE individual_data DROP status');
  43. $this->addSql('ALTER TABLE projects_boost DROP FOREIGN KEY FK_C3E573562395FCED');
  44. $this->addSql('DROP INDEX IDX_C3E573562395FCED ON projects_boost');
  45. $this->addSql('ALTER TABLE projects_boost DROP thematic_id, DROP description');
  46. $this->addSql('ALTER TABLE projects_inspiring DROP FOREIGN KEY FK_E60CAEC62395FCED');
  47. $this->addSql('DROP INDEX IDX_E60CAEC62395FCED ON projects_inspiring');
  48. $this->addSql('ALTER TABLE projects_inspiring DROP thematic_id, DROP description');
  49. $this->addSql('ALTER TABLE revolts DROP FOREIGN KEY FK_68E7DC9F2395FCED');
  50. $this->addSql('DROP INDEX IDX_68E7DC9F2395FCED ON revolts');
  51. $this->addSql('ALTER TABLE revolts DROP thematic_id, DROP description');
  52. }
  53. }