Cybo Advanced Field EngineCyboweb Technologies · Documentation · v1.0.2

Tables of an old system

The Table of an old system source (under From other data) reads a table of an old system that lives in the WordPress database, and, optionally, a second table that holds lists per record.

Which tables can be chosen

Only tables of this site (starting with its table prefix, for example wp_) that are not WordPress or CAFE tables. wp_users (password hashes), wp_options and CAFE's own tables are never offered, and a filter cannot add them. On multisite, site A never sees site B's tables. Narrow the list with the cafe_migration_database_tables filter.

Table and column names are checked against the real table definition, and every query is a prepared SELECT. No SQL is ever typed in the admin.

Options

Option Meaning
Table The table with one row per record
ID column Unique ID of each row (empty: the primary key). Imported objects remember it.
Table with lists Optional second table, for example the team members of each property
Column in that table that holds the ID of the record For example property_id

Columns whose names look secret (password, token, api_key, secret, hash, salt) are marked with a lock and their values are masked in previews.

Full example: properties with team members

Old tables:

wp_old_properties   (id, title, description, price, agent_id, featured_image, status)
wp_old_property_team (row_id, property_id, name, role, photo)
wp_old_agents        (id, name)

Target: post type property with the CAFE fields price (Number, decimal), agent (Post Object → agents), status (Select: available / sold) and team_members (Collection with name, role, photo).

Migration 1: agents (source key legacy-agents): table wp_old_agents → post type agent, name → Title.

Migration 2: properties (source key legacy-properties), table wp_old_properties, table with lists wp_old_property_team, link column property_id:

Source Target Transformations
title Title -
description Content -
price price Number (decimal separator: comma)
agent_id agent Old ID → imported post (source key legacy-agents)
featured_image Featured image Media library item by ID, URL or file path
status status Replace values: 1=available, 0=sold
rows (the list table) team_members columns: name → name, role → role, photo → photo (Media library item)

Run the agents first, then the properties: Preview, Dry run, Import.

What happens per batch of 50 properties: one query for the properties, one for all their team rows, one lookup per kind (agents, attachments), one query to find properties imported earlier, then the writes. Running the migration again updates the same posts; row order of the team is kept; a property without team rows gets an empty Collection.

The same migration written as PHP is in Custom PHP migrations.