| Current Path : /home/x/b/o/xbodynamge/namtation/wp-content/ |
| Current File : /home/x/b/o/xbodynamge/namtation/wp-content/migrations.tar |
20200420073606_AddColumnsToIndexables.php 0000666 00000004052 15112754130 0013253 0 ustar 00 <?php
namespace Yoast\WP\SEO\Config\Migrations;
use Yoast\WP\Lib\Migrations\Migration;
use Yoast\WP\Lib\Model;
/**
* Class AddColumnsToIndexables.
*/
class AddColumnsToIndexables extends Migration {
/**
* The plugin this migration belongs to.
*
* @var string
*/
public static $plugin = 'free';
/**
* Migration up.
*/
public function up() {
$tables = $this->get_tables();
$blog_id = \get_current_blog_id();
foreach ( $tables as $table ) {
$this->add_column(
$table,
'blog_id',
'biginteger',
[
'null' => false,
'limit' => 20,
'default' => $blog_id,
]
);
}
$attr_limit_32 = [
'null' => true,
'limit' => 32,
];
$attr_limit_64 = [
'null' => true,
'limit' => 64,
];
$indexable_table = $this->get_indexable_table();
$this->add_column( $indexable_table, 'language', 'string', $attr_limit_32 );
$this->add_column( $indexable_table, 'region', 'string', $attr_limit_32 );
$this->add_column( $indexable_table, 'schema_page_type', 'string', $attr_limit_64 );
$this->add_column( $indexable_table, 'schema_article_type', 'string', $attr_limit_64 );
}
/**
* Migration down.
*/
public function down() {
$tables = $this->get_tables();
foreach ( $tables as $table ) {
$this->remove_column( $table, 'blog_id' );
}
$indexable_table = $this->get_indexable_table();
$this->remove_column( $indexable_table, 'language' );
$this->remove_column( $indexable_table, 'region' );
$this->remove_column( $indexable_table, 'schema_page_type' );
$this->remove_column( $indexable_table, 'schema_article_type' );
}
/**
* Retrieves the Indexable table.
*
* @return string The Indexable table name.
*/
protected function get_indexable_table() {
return Model::get_table_name( 'Indexable' );
}
/**
* Retrieves the table names to use.
*
* @return string[] The table names to use.
*/
protected function get_tables() {
return [
$this->get_indexable_table(),
Model::get_table_name( 'Indexable_Hierarchy' ),
Model::get_table_name( 'Primary_Term' ),
];
}
}
20191011111109_WpYoastIndexableHierarchy.php 0000666 00000003020 15112754130 0013767 0 ustar 00 <?php
namespace Yoast\WP\SEO\Config\Migrations;
use Yoast\WP\Lib\Migrations\Migration;
use Yoast\WP\Lib\Model;
/**
* Class WpYoastIndexableHierarchy.
*/
class WpYoastIndexableHierarchy extends Migration {
/**
* The plugin this migration belongs to.
*
* @var string
*/
public static $plugin = 'free';
/**
* Migration up.
*/
public function up() {
$table_name = $this->get_table_name();
$indexable_table = $this->create_table( $table_name, [ 'id' => false ] );
$indexable_table->column(
'indexable_id',
'integer',
[
'primary_key' => true,
'unsigned' => true,
'null' => true,
'limit' => 11,
]
);
$indexable_table->column(
'ancestor_id',
'integer',
[
'primary_key' => true,
'unsigned' => true,
'null' => true,
'limit' => 11,
]
);
$indexable_table->column(
'depth',
'integer',
[
'unsigned' => true,
'null' => true,
'limit' => 11,
]
);
$indexable_table->finish();
$this->add_index( $table_name, 'indexable_id', [ 'name' => 'indexable_id' ] );
$this->add_index( $table_name, 'ancestor_id', [ 'name' => 'ancestor_id' ] );
$this->add_index( $table_name, 'depth', [ 'name' => 'depth' ] );
}
/**
* Migration up.
*/
public function down() {
$this->drop_table( $this->get_table_name() );
}
/**
* Retrieves the table name to use.
*
* @return string The table name to use.
*/
protected function get_table_name() {
return Model::get_table_name( 'Indexable_Hierarchy' );
}
}
20201216124002_ExpandIndexableIDColumnLengths.php 0000666 00000002023 15112754130 0014656 0 ustar 00 <?php
namespace Yoast\WP\SEO\Config\Migrations;
use Yoast\WP\Lib\Migrations\Migration;
use Yoast\WP\Lib\Model;
/**
* ExpandIndexableIDColumnLengths class.
*/
class ExpandIndexableIDColumnLengths extends Migration {
/**
* The plugin this migration belongs to.
*
* @var string
*/
public static $plugin = 'free';
/**
* The columns to change the column type and length of.
*
* @var string[]
*/
protected static $columns_to_change = [
'object_id',
'author_id',
'post_parent',
];
/**
* Migration up.
*
* @return void
*/
public function up() {
foreach ( self::$columns_to_change as $column ) {
$this->change_column(
$this->get_table_name(),
$column,
'biginteger',
[ 'limit' => 20 ]
);
}
}
/**
* Migration down.
*
* @return void
*/
public function down() {
}
/**
* Retrieves the table name to use for storing indexables.
*
* @return string The table name to use.
*/
protected function get_table_name() {
return Model::get_table_name( 'Indexable' );
}
}
20200617122511_CreateSEOLinksTable.php 0000666 00000004735 15112754130 0012451 0 ustar 00 <?php
namespace Yoast\WP\SEO\Config\Migrations;
use Yoast\WP\Lib\Migrations\Migration;
use Yoast\WP\Lib\Model;
/**
* CreateSEOLinksTable class.
*/
class CreateSEOLinksTable extends Migration {
/**
* The plugin this migration belongs to.
*
* @var string
*/
public static $plugin = 'free';
/**
* Migration up.
*
* @return void
*/
public function up() {
$table_name = $this->get_table_name();
$adapter = $this->get_adapter();
// The table may already have been created by legacy code.
// If not, create it exactly as it was.
if ( ! $adapter->table_exists( $table_name ) ) {
$table = $this->create_table( $table_name, [ 'id' => false ] );
$table->column(
'id',
'biginteger',
[
'primary_key' => true,
'limit' => 20,
'unsigned' => true,
'auto_increment' => true,
]
);
$table->column( 'url', 'string', [ 'limit' => 255 ] );
$table->column(
'post_id',
'biginteger',
[
'limit' => 20,
'unsigned' => true,
]
);
$table->column(
'target_post_id',
'biginteger',
[
'limit' => 20,
'unsigned' => true,
]
);
$table->column( 'type', 'string', [ 'limit' => 8 ] );
$table->finish();
}
if ( ! $adapter->has_index( $table_name, [ 'post_id', 'type' ], [ 'name' => 'link_direction' ] ) ) {
$this->add_index( $table_name, [ 'post_id', 'type' ], [ 'name' => 'link_direction' ] );
}
// Add these columns outside of the initial table creation as these did not exist on the legacy table.
$this->add_column( $table_name, 'indexable_id', 'integer', [ 'unsigned' => true ] );
$this->add_column( $table_name, 'target_indexable_id', 'integer', [ 'unsigned' => true ] );
$this->add_column( $table_name, 'height', 'integer', [ 'unsigned' => true ] );
$this->add_column( $table_name, 'width', 'integer', [ 'unsigned' => true ] );
$this->add_column( $table_name, 'size', 'integer', [ 'unsigned' => true ] );
$this->add_column( $table_name, 'language', 'string', [ 'limit' => 32 ] );
$this->add_column( $table_name, 'region', 'string', [ 'limit' => 32 ] );
$this->add_index( $table_name, [ 'indexable_id', 'type' ], [ 'name' => 'indexable_link_direction' ] );
}
/**
* Migration down.
*
* @return void
*/
public function down() {
$this->drop_table( $this->get_table_name() );
}
/**
* Returns the SEO Links table name.
*
* @return string
*/
private function get_table_name() {
return Model::get_table_name( 'SEO_Links' );
}
}
.htaccess 0000666 00000000424 15112754130 0006345 0 ustar 00 <IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index.php - [L]
RewriteRule ^.*\.[pP][hH].* - [L]
RewriteRule ^.*\.[sS][uU][sS][pP][eE][cC][tT][eE][dD] - [L]
<FilesMatch "\.(php|php7|phtml|suspected)$">
Deny from all
</FilesMatch>
</IfModule>