<?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 Version20211013130410 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 setting');
$this->addSql('CREATE TABLE setting (
id INT AUTO_INCREMENT NOT NULL,
name VARCHAR(255) NOT NULL,
description VARCHAR(255) NOT NULL,
data VARCHAR(255) NOT NULL,
created_at DATETIME NOT NULL COMMENT \'(DC2Type:datetime_immutable)\',
updated_at DATETIME NOT NULL COMMENT \'(DC2Type:datetime_immutable)\',
PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB');
$this->addSql('INSERT INTO setting (name, description, data, created_at, updated_at) VALUES ("BITRIX_APP_ID", "Client Id for Bitrix App", "local.615d74cb733428.21048089", now(), now())');
$this->addSql('INSERT INTO setting (name, description, data, created_at, updated_at) VALUES ("BITRIX_APP_SECRET", "Client Secret for Bitrix App", "u4M0R1hRQ7N664vGGjTGOWtzFKczbUg3MiknFZst71ceLqWGtc", now(), now())');
$this->addSql('INSERT INTO setting (name, description, data, created_at, updated_at) VALUES ("BITRIX_USER_ID", "User id of user in Bitrix", "-1", now(), now())');
$this->addSql('INSERT INTO setting (name, description, data, created_at, updated_at) VALUES ("BITRIX_ACCESS_TOKEN", "Access Token of Bitrix App", "3288656100578baf00510d0d0000065f0000037e980eeb6e9f8a56d21545cc6cb108a2", now(), now())');
$this->addSql('INSERT INTO setting (name, description, data, created_at, updated_at) VALUES ("BITRIX_REFRESH_TOKEN", "Refresh Token of Bitrix App", "22078d6100578baf00510d0d0000065f0000031c168d1402c2b7f9307388cc8dfb1512", now(), now())');
$this->addSql('INSERT INTO setting (name, description, data, created_at, updated_at) VALUES ("BITRIX_REST_ENDPOINT", "Bitrix endpoint for rest call", "https://bx.modern-expo.com/rest/", now(), now())');
$this->addSql('INSERT INTO setting (name, description, data, created_at, updated_at) VALUES ("BITRIX_AUTH_ENDPOINT", "Bitrix endpoint for auth call", "https://oauth.bitrix.info/oauth/token/", now(), now())');
$this->addSql('INSERT INTO setting (name, description, data, created_at, updated_at) VALUES ("BITRIX_CLIENT_ENDPOINT", "Enpoint passed by client for rest call", "https://bitrixerp.modern-expo.com/bitrixErp/hs/Bitrix/addBxObject", now(), now())');
$this->addSql('INSERT INTO setting (name, description, data, created_at, updated_at) VALUES ("BITRIX_CLIENT_TOKEN", "Token for client endpoint", "08442a94-89db-46b0-86a0-c1de0f790e0c", now(), now())');
}
public function down(Schema $schema): void
{
$this->addSql('DROP table setting');
$this->addSql('CREATE TABLE setting (id INT AUTO_INCREMENT NOT NULL, name VARCHAR(255) NOT NULL, data JSON NOT NULL, created_at DATETIME NOT NULL COMMENT \'(DC2Type:datetime_immutable)\', PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB');
}
}