tarlepp /
symfony-flex-backend
| 1 | <?php |
||
| 2 | declare(strict_types = 1); |
||
| 3 | |||
| 4 | // phpcs:ignoreFile |
||
| 5 | namespace DoctrineMigrations; |
||
| 6 | |||
| 7 | use Doctrine\DBAL\Platforms\AbstractMySQLPlatform; |
||
| 8 | use Doctrine\DBAL\Schema\Schema; |
||
| 9 | use Doctrine\Migrations\AbstractMigration; |
||
| 10 | |||
| 11 | /** |
||
| 12 | * Auto-generated Migration: Please modify to your needs! |
||
| 13 | */ |
||
| 14 | final class Version20230930102814 extends AbstractMigration |
||
| 15 | { |
||
| 16 | /** |
||
| 17 | * @noinspection PhpMissingParentCallCommonInspection |
||
| 18 | */ |
||
| 19 | public function getDescription(): string |
||
| 20 | { |
||
| 21 | return 'TODO: Describe reason for this migration'; |
||
| 22 | } |
||
| 23 | |||
| 24 | public function up(Schema $schema): void |
||
| 25 | { |
||
| 26 | // this up() migration is auto-generated, please modify it to your needs |
||
| 27 | $this->abortIf( |
||
| 28 | !$this->connection->getDatabasePlatform() instanceof AbstractMySQLPlatform, |
||
| 29 | 'Migration can only be executed safely on \'mysql\'.' |
||
| 30 | ); |
||
| 31 | |||
| 32 | $sql = <<<SQL |
||
| 33 | ALTER TABLE log_request |
||
| 34 | CHANGE headers headers JSON NOT NULL COMMENT '(DC2Type:json)', |
||
| 35 | CHANGE parameters parameters JSON NOT NULL COMMENT '(DC2Type:json)' |
||
| 36 | SQL; |
||
| 37 | |||
| 38 | $this->addSql($sql); |
||
| 39 | } |
||
| 40 | |||
| 41 | /** |
||
| 42 | * @noinspection PhpMissingParentCallCommonInspection |
||
| 43 | */ |
||
| 44 | public function down(Schema $schema): void |
||
| 45 | { |
||
| 46 | // this down() migration is auto-generated, please modify it to your needs |
||
| 47 | $this->abortIf( |
||
| 48 | !$this->connection->getDatabasePlatform() instanceof AbstractMySQLPlatform, |
||
| 49 | 'Migration can only be executed safely on \'mysql\'.' |
||
| 50 | ); |
||
| 51 | |||
| 52 | $sql = <<<SQL |
||
|
0 ignored issues
–
show
Unused Code
introduced
by
Loading history...
|
|||
| 53 | ALTER TABLE log_request |
||
| 54 | CHANGE headers headers LONGTEXT NOT NULL COMMENT '(DC2Type:json)', |
||
| 55 | CHANGE parameters parameters LONGTEXT NOT NULL COMMENT '(DC2Type:json)' |
||
| 56 | SQL; |
||
| 57 | |||
| 58 | |||
| 59 | $this->addSql(''); |
||
| 60 | } |
||
| 61 | } |
||
| 62 |