<?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 Version20241024113415 extends AbstractMigration
{
public function getDescription(): string
{
return '';
}
public function up(Schema $schema): void
{
$this->addSql("ALTER TABLE `std_web_users`
ADD COLUMN `apple_refresh_token` VARCHAR(255) NULL AFTER `apple_id`;");
$this->addSql("DELETE FROM `std_config` WHERE `machine_name` = 'OAUTH_APPLE_CLIENT_SECRET';");
$this->addSql("INSERT INTO `std_config` (`machine_name`, `created_by`, `updated_by`, `value`, `description_machine_name`, `details_machine_name`, `parent_name`, `variable_type`, `order_value`, `is_hidden`, `is_active`, `created_date`, `updated_date`, `label`, `content`, `language_code`, `roles`)
VALUES ('OAUTH_APPLE_TEAM_ID', 1, 1, '', 'OAUTH_APPLE_TEAM_ID', 'OAUTH_APPLE_TEAM_ID', 'OAuth Apple', 'INPUT', 2, 0, 1, NOW(), NOW(), 'OAuth Apple Team Id', NULL, '', NULL);
");
$this->addSql("INSERT INTO `std_config` (`machine_name`, `created_by`, `updated_by`, `value`, `description_machine_name`, `details_machine_name`, `parent_name`, `variable_type`, `order_value`, `is_hidden`, `is_active`, `created_date`, `updated_date`, `label`, `content`, `language_code`, `roles`)
VALUES ('OAUTH_APPLE_KEY_ID', 1, 1, '', 'OAUTH_APPLE_KEY_ID', 'OAUTH_APPLE_KEY_ID', 'OAuth Apple', 'INPUT', 3, 0, 1, NOW(), NOW(), 'OAuth Apple Key Id', NULL, '', NULL);
");
$this->addSql("INSERT INTO `std_config` (`machine_name`, `created_by`, `updated_by`, `value`, `description_machine_name`, `details_machine_name`, `parent_name`, `variable_type`, `order_value`, `is_hidden`, `is_active`, `created_date`, `updated_date`, `label`, `content`, `language_code`, `roles`)
VALUES ('OAUTH_APPLE_KEY', 1, 1, '', 'OAUTH_APPLE_KEY', 'OAUTH_APPLE_KEY', 'OAuth Apple', 'TEXTAREA', 4, 0, 1, NOW(), NOW(), 'OAuth Apple Key', NULL, '', NULL);
");
}
public function down(Schema $schema): void
{
$this->addSql("ALTER TABLE `std_web_users`
DROP COLUMN `apple_refresh_token`;");
$this->addSql("INSERT INTO `std_config` (`machine_name`, `created_by`, `updated_by`, `value`, `description_machine_name`, `details_machine_name`, `parent_name`, `variable_type`, `order_value`, `is_hidden`, `is_active`, `created_date`, `updated_date`, `label`, `content`, `language_code`, `roles`) VALUES ('OAUTH_APPLE_CLIENT_SECRET', 1, 1, '', 'OAUTH_APPLE_CLIENT_SECRET', 'OAUTH_APPLE_CLIENT_SECRET', 'OAuth Apple', 'INPUT', 2, 0, 1, now(), now(), 'OAuth Apple Client Secret', NULL, '', NULL);");
$this->addSql("DELETE FROM `std_config` WHERE `machine_name` = 'OAUTH_APPLE_TEAM_ID';");
$this->addSql("DELETE FROM `std_config` WHERE `machine_name` = 'OAUTH_APPLE_KEY_ID';");
$this->addSql("DELETE FROM `std_config` WHERE `machine_name` = 'OAUTH_APPLE_KEY';");
}
}