<?php
use Phinx\Migration\AbstractMigration;
class ReplaceCharsInOffers extends AbstractMigration
{
/**
* Migrate Up.
*/
public function up(): void
{
$this->execute("UPDATE offers SET title = replace(`title`, '&', '&')");
$this->execute("UPDATE offers SET title = replace(`title`, '"', '\"')");
$this->execute("UPDATE offers SET title = replace(`title`, ''', \"'\")");
$this->execute("UPDATE offers SET title = replace(`title`, ''', \"'\")");
$this->execute("UPDATE offers SET title = replace(`title`, '$', '$')");
$this->execute("UPDATE offers SET title = replace(`title`, '\', '\\\')");
$this->execute("UPDATE offers SET title = replace(`title`, '|', '|')");
$this->execute("UPDATE offers SET title = replace(`title`, '^', '^')");
$this->execute("UPDATE offers SET title = replace(`title`, '`', '`')");
$this->execute("UPDATE offers SET title = replace(`title`, '%', '%')");
$this->execute("UPDATE offers SET title = replace(`title`, ':', ':')");
$this->execute("UPDATE offers SET title = replace(`title`, '@', '@')");
$this->execute("UPDATE offers SET title = replace(`title`, '<', '<')");
$this->execute("UPDATE offers SET title = replace(`title`, '>', '>')");
$this->execute("UPDATE offers SET text = replace(`text`, '&', '&')");
$this->execute("UPDATE offers SET text = replace(`text`, '"', '\"')");
$this->execute("UPDATE offers SET text = replace(`text`, ''', \"'\")");
$this->execute("UPDATE offers SET text = replace(`text`, ''', \"'\")");
$this->execute("UPDATE offers SET text = replace(`text`, '$', '$')");
$this->execute("UPDATE offers SET text = replace(`text`, '\', '\\\')");
$this->execute("UPDATE offers SET text = replace(`text`, '|', '|')");
$this->execute("UPDATE offers SET text = replace(`text`, '^', '^')");
$this->execute("UPDATE offers SET text = replace(`text`, '`', '`')");
$this->execute("UPDATE offers SET text = replace(`text`, '%', '%')");
$this->execute("UPDATE offers SET text = replace(`text`, ':', ':')");
$this->execute("UPDATE offers SET text = replace(`text`, '@', '@')");
$this->execute("UPDATE offers SET text = replace(`text`, '<', '<')");
$this->execute("UPDATE offers SET text = replace(`text`, '>', '>')");
$this->execute("UPDATE offers SET reply = replace(`reply`, '&', '&')");
$this->execute("UPDATE offers SET reply = replace(`reply`, '"', '\"')");
$this->execute("UPDATE offers SET reply = replace(`reply`, ''', \"'\")");
$this->execute("UPDATE offers SET reply = replace(`reply`, ''', \"'\")");
$this->execute("UPDATE offers SET reply = replace(`reply`, '$', '$')");
$this->execute("UPDATE offers SET reply = replace(`reply`, '\', '\\\')");
$this->execute("UPDATE offers SET reply = replace(`reply`, '|', '|')");
$this->execute("UPDATE offers SET reply = replace(`reply`, '^', '^')");
$this->execute("UPDATE offers SET reply = replace(`reply`, '`', '`')");
$this->execute("UPDATE offers SET reply = replace(`reply`, '%', '%')");
$this->execute("UPDATE offers SET reply = replace(`reply`, ':', ':')");
$this->execute("UPDATE offers SET reply = replace(`reply`, '@', '@')");
$this->execute("UPDATE offers SET reply = replace(`reply`, '<', '<')");
$this->execute("UPDATE offers SET reply = replace(`reply`, '>', '>')");
}
/**
* Migrate Down.
*/
public function down(): void
{
$this->execute("UPDATE offers SET title = replace(`title`, '&', '&')");
$this->execute("UPDATE offers SET title = replace(`title`, '\"', '"')");
$this->execute("UPDATE offers SET title = replace(`title`, \"'\", ''')");
$this->execute("UPDATE offers SET title = replace(`title`, '<', '<')");
$this->execute("UPDATE offers SET title = replace(`title`, '>', '>')");
$this->execute("UPDATE offers SET text = replace(`text`, '&', '&')");
$this->execute("UPDATE offers SET text = replace(`text`, '\"', '"')");
$this->execute("UPDATE offers SET text = replace(`text`, \"'\", ''')");
$this->execute("UPDATE offers SET text = replace(`text`, '<', '<')");
$this->execute("UPDATE offers SET text = replace(`text`, '>', '>')");
$this->execute("UPDATE offers SET reply = replace(`reply`, '&', '&')");
$this->execute("UPDATE offers SET reply = replace(`reply`, '\"', '"')");
$this->execute("UPDATE offers SET reply = replace(`reply`, \"'\", ''')");
$this->execute("UPDATE offers SET reply = replace(`reply`, '<', '<')");
$this->execute("UPDATE offers SET reply = replace(`reply`, '>', '>')");
}
}