Nie możesz wybrać więcej, niż 25 tematów Tematy muszą się zaczynać od litery lub cyfry, mogą zawierać myślniki ('-') i mogą mieć do 35 znaków.

54 lines
2.7KB

  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 Version20210827103949 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 ADD subthematic_id INT DEFAULT NULL');
  19. $this->addSql('ALTER TABLE dream ADD CONSTRAINT FK_6A5F004F6C159F58 FOREIGN KEY (subthematic_id) REFERENCES subthematic (id)');
  20. $this->addSql('CREATE INDEX IDX_6A5F004F6C159F58 ON dream (subthematic_id)');
  21. $this->addSql('ALTER TABLE project_boost ADD subthematic_id INT DEFAULT NULL');
  22. $this->addSql('ALTER TABLE project_boost ADD CONSTRAINT FK_45312EF66C159F58 FOREIGN KEY (subthematic_id) REFERENCES subthematic (id)');
  23. $this->addSql('CREATE INDEX IDX_45312EF66C159F58 ON project_boost (subthematic_id)');
  24. $this->addSql('ALTER TABLE project_inspiring ADD subthematic_id INT DEFAULT NULL');
  25. $this->addSql('ALTER TABLE project_inspiring ADD CONSTRAINT FK_2E8C2C2E6C159F58 FOREIGN KEY (subthematic_id) REFERENCES subthematic (id)');
  26. $this->addSql('CREATE INDEX IDX_2E8C2C2E6C159F58 ON project_inspiring (subthematic_id)');
  27. $this->addSql('ALTER TABLE revolt ADD subthematic_id INT DEFAULT NULL');
  28. $this->addSql('ALTER TABLE revolt ADD CONSTRAINT FK_350517876C159F58 FOREIGN KEY (subthematic_id) REFERENCES subthematic (id)');
  29. $this->addSql('CREATE INDEX IDX_350517876C159F58 ON revolt (subthematic_id)');
  30. }
  31. public function down(Schema $schema): void
  32. {
  33. // this down() migration is auto-generated, please modify it to your needs
  34. $this->addSql('ALTER TABLE dream DROP FOREIGN KEY FK_6A5F004F6C159F58');
  35. $this->addSql('DROP INDEX IDX_6A5F004F6C159F58 ON dream');
  36. $this->addSql('ALTER TABLE dream DROP subthematic_id');
  37. $this->addSql('ALTER TABLE project_boost DROP FOREIGN KEY FK_45312EF66C159F58');
  38. $this->addSql('DROP INDEX IDX_45312EF66C159F58 ON project_boost');
  39. $this->addSql('ALTER TABLE project_boost DROP subthematic_id');
  40. $this->addSql('ALTER TABLE project_inspiring DROP FOREIGN KEY FK_2E8C2C2E6C159F58');
  41. $this->addSql('DROP INDEX IDX_2E8C2C2E6C159F58 ON project_inspiring');
  42. $this->addSql('ALTER TABLE project_inspiring DROP subthematic_id');
  43. $this->addSql('ALTER TABLE revolt DROP FOREIGN KEY FK_350517876C159F58');
  44. $this->addSql('DROP INDEX IDX_350517876C159F58 ON revolt');
  45. $this->addSql('ALTER TABLE revolt DROP subthematic_id');
  46. }
  47. }