|
1234567891011121314151617181920212223242526272829303132333435363738394041424344454647 |
- <?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 Version20220114102625 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('DROP TABLE configuration');
- $this->addSql('ALTER TABLE file CHANGE created_by_id created_by_id INT DEFAULT NULL, CHANGE updated_by_id updated_by_id INT DEFAULT NULL');
- $this->addSql('ALTER TABLE group_user ADD description LONGTEXT DEFAULT NULL, ADD meta_title VARCHAR(255) DEFAULT NULL, ADD meta_description LONGTEXT DEFAULT NULL, ADD old_urls LONGTEXT DEFAULT NULL COMMENT \'(DC2Type:array)\', ADD slug VARCHAR(255) NOT NULL, ADD position DOUBLE PRECISION NOT NULL, ADD status DOUBLE PRECISION NOT NULL, CHANGE created_by_id created_by_id INT DEFAULT NULL, CHANGE updated_by_id updated_by_id INT DEFAULT NULL');
- $this->addSql('ALTER TABLE page CHANGE created_by_id created_by_id INT DEFAULT NULL, CHANGE updated_by_id updated_by_id INT DEFAULT NULL');
- $this->addSql('ALTER TABLE reminder CHANGE created_by_id created_by_id INT DEFAULT NULL, CHANGE updated_by_id updated_by_id INT DEFAULT NULL');
- $this->addSql('ALTER TABLE site_setting CHANGE name name VARCHAR(63) DEFAULT NULL');
- $this->addSql('ALTER TABLE ticket CHANGE created_by_id created_by_id INT DEFAULT NULL, CHANGE updated_by_id updated_by_id INT DEFAULT NULL');
- $this->addSql('ALTER TABLE ticket_message CHANGE created_by_id created_by_id INT DEFAULT NULL, CHANGE updated_by_id updated_by_id INT DEFAULT NULL');
- $this->addSql('ALTER TABLE user ADD created_at DATETIME NOT NULL, ADD updated_at DATETIME NOT NULL');
- }
-
- public function down(Schema $schema): void
- {
- // this down() migration is auto-generated, please modify it to your needs
- $this->addSql('CREATE TABLE configuration (id INT AUTO_INCREMENT NOT NULL, value VARCHAR(255) CHARACTER SET utf8mb4 NOT NULL COLLATE `utf8mb4_unicode_ci`, dev_alias VARCHAR(255) CHARACTER SET utf8mb4 DEFAULT NULL COLLATE `utf8mb4_unicode_ci`, PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8 COLLATE `utf8_unicode_ci` ENGINE = InnoDB COMMENT = \'\' ');
- $this->addSql('ALTER TABLE file CHANGE created_by_id created_by_id INT NOT NULL, CHANGE updated_by_id updated_by_id INT NOT NULL');
- $this->addSql('ALTER TABLE group_user DROP description, DROP meta_title, DROP meta_description, DROP old_urls, DROP slug, DROP position, DROP status, CHANGE created_by_id created_by_id INT NOT NULL, CHANGE updated_by_id updated_by_id INT NOT NULL');
- $this->addSql('ALTER TABLE page CHANGE created_by_id created_by_id INT NOT NULL, CHANGE updated_by_id updated_by_id INT NOT NULL');
- $this->addSql('ALTER TABLE reminder CHANGE created_by_id created_by_id INT NOT NULL, CHANGE updated_by_id updated_by_id INT NOT NULL');
- $this->addSql('ALTER TABLE site_setting CHANGE name name VARCHAR(63) CHARACTER SET utf8mb4 NOT NULL COLLATE `utf8mb4_unicode_ci`');
- $this->addSql('ALTER TABLE ticket CHANGE created_by_id created_by_id INT NOT NULL, CHANGE updated_by_id updated_by_id INT NOT NULL');
- $this->addSql('ALTER TABLE ticket_message CHANGE created_by_id created_by_id INT NOT NULL, CHANGE updated_by_id updated_by_id INT NOT NULL');
- $this->addSql('ALTER TABLE user DROP created_at, DROP updated_at');
- }
- }
|