zend-blog-3-backend

Форк
0
/
Version20240830055032.php 
30 строк · 1.5 Кб
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 Version20240830055032 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('CREATE TABLE subscription_settings (id INT AUTO_INCREMENT NOT NULL, email VARCHAR(64) NOT NULL, block_sending TINYINT(1) DEFAULT 0 NOT NULL, subs_type SMALLINT DEFAULT 1 NOT NULL COMMENT \'1: reply\', time_created DATETIME(3) DEFAULT CURRENT_TIMESTAMP(3) NOT NULL COMMENT \'(DC2Type:milliseconds_dt)\', last_update DATETIME(3) DEFAULT CURRENT_TIMESTAMP(3) NOT NULL COMMENT \'(DC2Type:milliseconds_dt)\', UNIQUE INDEX UNIQ_82EBFFE9E7927C744DD186C6 (email, subs_type), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB');
21
    }
22

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

28
        $this->addSql('DROP TABLE subscription_settings');
29
    }
30
}
31

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

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

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

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