Automattic\WooCommerce\Database\Migrations
MetaToCustomTableMigrator::get_schema_config()
Specify schema config the source and destination table.
Method of the class: MetaToCustomTableMigrator{}
No Hooks.
Return
Array
. Schema, must of the form: array(
'source' => array( 'entity' => array( 'table_name' => $source_table_name, 'meta_rel_column' => $column_meta, Name of column in source table which is referenced by meta table. 'destination_rel_column' => $column_dest, Name of column in source table which is refenced by destination table, 'primary_key' => $primary_key, Primary key of the source table ), 'meta' => array( 'table' => $meta_table_name, 'meta_key_column' => $meta_key_column_name, 'meta_value_column' => $meta_value_column_name, 'entity_id_column' => $entity_id_column, Name of the column having entity IDs. ), ), 'destination' => array( 'table_name' => $table_name, Name of destination table, 'source_rel_column' => $column_source_id, Name of the column in destination table which is referenced by source table. 'primary_key' => $table_primary_key, 'primary_key_type' => $type bool|int|string|decimal )
Usage
// protected - for code of main (parent) or child class $result = $this->get_schema_config(): array;
MetaToCustomTableMigrator::get_schema_config() MetaToCustomTableMigrator::get schema config code WC 9.7.1
abstract protected function get_schema_config(): array;