namespace Yoast\WP\SEO\Config\Migrations;
use Yoast\WP\Lib\Migrations\Migration;
* Migration for the Primary Term.
class WpYoastPrimaryTerm extends Migration {
* The plugin this migration belongs to.
public static $plugin = 'free';
$table_name = $this->get_table_name();
$indexable_table = $this->create_table( $table_name );
$indexable_table->column(
$indexable_table->column(
$indexable_table->column(
// Executes the SQL to create the table.
$indexable_table->finish();
'name' => 'post_taxonomy',
$this->add_timestamps( $table_name );
$this->drop_table( $this->get_table_name() );
* Retrieves the table name to use.
* @return string Table name to use.
protected function get_table_name() {
return Model::get_table_name( 'Primary_Term' );