insert the config key

This commit is contained in:
Daniel Seifert 2024-03-19 16:06:34 +01:00
parent 177ebf8f01
commit a2c4f58bdc
Signed by: DanielS
GPG Key ID: 8A7C4C6ED1915C6F
2 changed files with 4 additions and 4 deletions

View File

@ -33,7 +33,7 @@ final class Version20240318163727 extends AbstractMigration
$this->skipIf(!$column->getType() instanceof BlobType, 'Config values are already decoded');
$this->addSql('ALTER TABLE oxconfig ADD COLUMN `OXVARVALUE_UNENC` text;');
$this->addSql("UPDATE oxconfig SET `OXVARVALUE_UNENC` = DECODE(OXVARVALUE, '".Config::DEFAULT_CONFIG_KEY."') WHERE 1;");
$this->addSql("UPDATE oxconfig SET `OXVARVALUE_UNENC` = DECODE(OXVARVALUE, 'fq45QS09_fqyx09239QQ') WHERE 1;");
$this->addSql('ALTER TABLE oxconfig MODIFY COLUMN `OXVARVALUE` text;');
$this->addSql("UPDATE oxconfig SET `OXVARVALUE` = `OXVARVALUE_UNENC` WHERE 1;");
$this->addSql('ALTER TABLE oxconfig DROP COLUMN `OXVARVALUE_UNENC`;');
@ -51,7 +51,7 @@ final class Version20240318163727 extends AbstractMigration
$this->skipIf($column->getType() instanceof BlobType, 'Config values are already encoded');
$this->addSql( 'ALTER TABLE oxconfig ADD COLUMN `OXVARVALUE_ENC` text;' );
$this->addSql( "UPDATE oxconfig SET `OXVARVALUE_ENC` = ENCODE(OXVARVALUE, '" . Config::DEFAULT_CONFIG_KEY . "') WHERE 1;" );
$this->addSql( "UPDATE oxconfig SET `OXVARVALUE_ENC` = ENCODE(OXVARVALUE, 'fq45QS09_fqyx09239QQ') WHERE 1;" );
$this->addSql( 'ALTER TABLE oxconfig MODIFY COLUMN `OXVARVALUE` mediumblob;' );
$this->addSql( "UPDATE oxconfig SET `OXVARVALUE` = `OXVARVALUE_ENC` WHERE 1;" );
$this->addSql( 'ALTER TABLE oxconfig DROP COLUMN `OXVARVALUE_ENC`;' );

View File

@ -33,7 +33,7 @@ final class Version20240319113842 extends AbstractMigration
$this->skipIf(!$column->getType() instanceof BlobType, 'Userpayment values are already decoded');
$this->addSql('ALTER TABLE oxuserpayments ADD COLUMN `OXVALUE_UNENC` text;');
$this->addSql("UPDATE oxuserpayments SET `OXVALUE_UNENC` = DECODE(OXVALUE, '".Config::DEFAULT_CONFIG_KEY."') WHERE 1;");
$this->addSql("UPDATE oxuserpayments SET `OXVALUE_UNENC` = DECODE(OXVALUE, 'fq45QS09_fqyx09239QQ') WHERE 1;");
$this->addSql('ALTER TABLE oxuserpayments MODIFY COLUMN `OXVALUE` text;');
$this->addSql("UPDATE oxuserpayments SET `OXVALUE` = `OXVALUE_UNENC` WHERE 1;");
$this->addSql('ALTER TABLE oxuserpayments DROP COLUMN `OXVALUE_UNENC`;');
@ -51,7 +51,7 @@ final class Version20240319113842 extends AbstractMigration
$this->skipIf($column->getType() instanceof BlobType, 'Userpayment values are already encoded');
$this->addSql('ALTER TABLE oxuserpayments ADD COLUMN `OXVALUE_ENC` text;');
$this->addSql("UPDATE oxuserpayments SET `OXVALUE_ENC` = ENCODE(OXVALUE, '".Config::DEFAULT_CONFIG_KEY."') WHERE 1;");
$this->addSql("UPDATE oxuserpayments SET `OXVALUE_ENC` = ENCODE(OXVALUE, 'fq45QS09_fqyx09239QQ') WHERE 1;");
$this->addSql('ALTER TABLE oxuserpayments MODIFY COLUMN `OXVALUE` blob;');
$this->addSql("UPDATE oxuserpayments SET `OXVALUE` = `OXVALUE_ENC` WHERE 1;");
$this->addSql('ALTER TABLE oxuserpayments DROP COLUMN `OXVALUE_ENC`;');