|
1234567891011121314151617181920212223242526272829303132333435 |
- <?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 Version20210520093811 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 page ADD parent_id INT DEFAULT NULL, DROP date_event, DROP date_time_event, DROP message, DROP show_inmenu');
- $this->addSql('ALTER TABLE page ADD CONSTRAINT FK_140AB620727ACA70 FOREIGN KEY (parent_id) REFERENCES page (id)');
- $this->addSql('CREATE INDEX IDX_140AB620727ACA70 ON page (parent_id)');
- }
-
- public function down(Schema $schema): void
- {
- // this down() migration is auto-generated, please modify it to your needs
- $this->addSql('ALTER TABLE page DROP FOREIGN KEY FK_140AB620727ACA70');
- $this->addSql('DROP INDEX IDX_140AB620727ACA70 ON page');
- $this->addSql('ALTER TABLE page ADD date_event DATE DEFAULT NULL, ADD date_time_event DATETIME DEFAULT NULL, ADD message LONGTEXT CHARACTER SET utf8mb4 DEFAULT NULL COLLATE `utf8mb4_unicode_ci`, ADD show_inmenu TINYINT(1) DEFAULT NULL, DROP parent_id');
- }
- }
|