Server IP : 172.67.158.161 / Your IP : 3.141.28.116 Web Server : LiteSpeed System : Linux business53.web-hosting.com 4.18.0-553.lve.el8.x86_64 #1 SMP Mon May 27 15:27:34 UTC 2024 x86_64 User : giankuin ( 1871) PHP Version : 7.4.33 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : OFF | Pkexec : OFF Directory : /proc/self/root/proc/thread-self/root/proc/self/cwd/wp-content/plugins/wordpress-seo/migrations/ |
Upload File : |
<?php /** * Yoast SEO Plugin File. * * @package WPSEO\Migrations */ use Yoast\WP\SEO\ORM\Yoast_Model; use YoastSEO_Vendor\Ruckusing_Migration_Base; /** * Class WpYoastExpandIndexable */ class WpYoastExpandIndexable extends Ruckusing_Migration_Base { /** * Migration up. */ public function up() { $table_name = $this->get_table_name(); $this->add_column( $table_name, 'og_title', 'string', [ 'null' => true, 'limit' => 191 ] ); $this->add_column( $table_name, 'og_image', 'mediumtext', [ 'null' => true ] ); $this->add_column( $table_name, 'og_description', 'mediumtext', [ 'null' => true ] ); $this->add_column( $table_name, 'twitter_title', 'string', [ 'null' => true, 'limit' => 191 ] ); $this->add_column( $table_name, 'twitter_image', 'mediumtext', [ 'null' => true ] ); $this->add_column( $table_name, 'twitter_description', 'mediumtext', [ 'null' => true ] ); $this->add_column( $table_name, 'permalink_hash', 'string', [ 'null' => true, 'limit' => 191 ] ); $this->add_index( $table_name, 'permalink_hash' ); $this->remove_index( $table_name, [ 'permalink', ], [ 'name' => 'unique_permalink', 'unique' => true, ] ); $this->change_column( $table_name, 'permalink', 'mediumtext', [ 'null' => true ] ); $this->change_column( $table_name, 'canonical', 'mediumtext', [ 'null' => true ] ); } /** * Migration down. */ public function down() { $table_name = $this->get_table_name(); $this->remove_column( $table_name, 'og_title' ); $this->remove_column( $table_name, 'og_image' ); $this->remove_column( $table_name, 'og_description' ); $this->remove_column( $table_name, 'twitter_title' ); $this->remove_column( $table_name, 'twitter_image' ); $this->remove_column( $table_name, 'twitter_description' ); $this->remove_index( $table_name, 'permalink_hash' ); $this->remove_column( $table_name, 'permalink_hash' ); $this->change_column( $table_name, 'permalink', 'string', [ 'null' => true, 'limit' => 191 ] ); $this->change_column( $table_name, 'canonical', 'string', [ 'null' => true, 'limit' => 191 ] ); $this->add_index( $table_name, [ 'permalink', ], [ 'name' => 'unique_permalink', 'unique' => true, ] ); } /** * Retrieves the table name to use. * * @return string The table name to use. */ protected function get_table_name() { return Yoast_Model::get_table_name( 'Indexable' ); } }