zend-blog-3-backend

Форк
0
/
Version20230714065712.php 
36 строк · 1.4 Кб
1
<?php
2

3
declare(strict_types=1);
4

5
namespace Application\Migrations;
6

7
use Doctrine\DBAL\Schema\Schema;
8
use Doctrine\Migrations\AbstractMigration;
9

10
/**
11
 * Auto-generated Migration: Please modify to your needs!
12
 */
13
final class Version20230714065712 extends AbstractMigration
14
{
15
    public function up(Schema $schema): void
16
    {
17
        // this up() migration is auto-generated, please modify it to your needs
18
        $this->abortIf($this->connection->getDatabasePlatform()->getName() !== 'mysql', 'Migration can only be executed safely on \'mysql\'.');
19

20
        $this->addSql('ALTER TABLE media_file ADD picture_tag TEXT DEFAULT NULL');
21
        $this->addSql('DROP INDEX UNIQ_885DBAFAC71A1E10 ON posts');
22
        $this->addSql('ALTER TABLE posts DROP disqus_thread');
23
        $this->addSql('ALTER TABLE media_file ADD src_set TEXT DEFAULT NULL');
24
    }
25

26
    public function down(Schema $schema): void
27
    {
28
        // this down() migration is auto-generated, please modify it to your needs
29
        $this->abortIf($this->connection->getDatabasePlatform()->getName() !== 'mysql', 'Migration can only be executed safely on \'mysql\'.');
30

31
        $this->addSql('ALTER TABLE media_file DROP picture_tag');
32
        $this->addSql('ALTER TABLE posts ADD disqus_thread BIGINT DEFAULT NULL');
33
        $this->addSql('CREATE UNIQUE INDEX UNIQ_885DBAFAC71A1E10 ON posts (disqus_thread)');
34
        $this->addSql('ALTER TABLE media_file DROP src_set');
35
    }
36
}
37

Использование cookies

Мы используем файлы cookie в соответствии с Политикой конфиденциальности и Политикой использования cookies.

Нажимая кнопку «Принимаю», Вы даете АО «СберТех» согласие на обработку Ваших персональных данных в целях совершенствования нашего веб-сайта и Сервиса GitVerse, а также повышения удобства их использования.

Запретить использование cookies Вы можете самостоятельно в настройках Вашего браузера.