Lesson 6.3: Path B: down to the Exponential 6 legacy kernel
The content model of every platform generation is the legacy kernel's, so a Symfony-based site can move down to Exponential 6. Path B rewrites the presentation and the custom code; the content tables are shared. This lesson teaches what the two share, what is lost and gained, the field types that need a decision, and the six database steps of chapter 16.6.4, with the one command whose direction is easy to get wrong.
Note
Every database step in this lesson is rehearsed on a copy. Learners read and plan; the only commands they run are read-only.
At a glance
| Course | Migrating to Exponential |
| Module | Module 6: From the Symfony-based platforms |
| Duration | 60 minutes (25 presenting, 35 exercise) |
| Level | Advanced |
| Audience | Developers and administrators |
| Prerequisites | Lesson 6.1; Module 4 for the legacy database background |
Learning objectives
After this lesson, learners can:
- explain which tables the platform generations share with the legacy kernel and which they dropped or renamed;
- list what path B loses and gains;
- decide what to do with five field types that have no legacy datatype;
- order the six database steps and run
ezsqldiff.phpwith the reference schema first; - describe how a Symfony stack can keep running next to the legacy kernel.
Trainer's notes
How to present it
Source: chapter 16.6.
- What the two share (4 minutes). Content, classes, locations, versions, URL aliases, roles, sections, states,
languages and users are the same tables with the same meaning. Shop, workflow, collaboration and other legacy
tables were dropped by the vendor's 3.0 step (about 80 tables); 5.0 renamed the core tables to
ibexa_*(16.6.1). - Lose and gain (4 minutes). Show the table of 16.6.2: lose the Symfony admin, Twig, REST v2 and GraphQL, Page Builder; gain the legacy admin, TPL with overrides, legacy workflows, information collection, shop, newsletters, Exponential Layouts, Velocity, SQLite in production.
- Field types (5 minutes). From 16.6.3:
ezrichtext(convert, or keep and adapt the output);ezmatrixof 2.5 and later has a different format;ezimageassetchanges toezobjectrelation(both keep the target id indata_int);ezcontentquerybecomes a template fetch;ezlandingpageandezformare rebuilt with Exponential Layouts and information collection. - Six database steps (8 minutes). Back up and stop the Symfony stack; on 5.0, take the table names back (reverse
renames, or the database translator extension); make the schema the 6.0.15 schema with
ezsqldiff.php; giveezkeyword_attribute_link.versiona default; insert the version rows; settings, storage with the sameVarDir, caches and a clean search index. - The direction trap (2 minutes).
ezsqldiff.phpprints the SQL that turns the second argument into the first. Reference schema first, your database second. Sanity check:DROP TABLElines may only name Symfony-side tables; if they listezbasketorezworkflow, the arguments are the wrong way round. - Both stacks (2 minutes). Platform Legacy and the older Nexus lines run both kernels on one database through the
legacy bridge (16.6.8). Remove the
DROPlines while the Symfony stack may still be needed.
Common questions
Can we read the old ezpublish-version row of a 2.5 database as a legacy version? No. The Symfony kernel's update
files write their own kernel version into it; do not start the legacy chain of chapter 11 from it (16.6.4, step 5).
Does SQLite work as a source? ezsqldiff.php speaks MySQL and PostgreSQL only; convert first, or move the content
at the application level (16.6.4).
What about emoji in content? The legacy kernel's default connection charset on MySQL is the three-byte utf8,
which cannot carry characters outside the Basic Multilingual Plane. Check content for them before the move (16.6.4).
Pitfalls
- Running the
ezsqldiff.phpoutput unread. It containsDROPstatements; read it, keep what you need, then run it without--force. - Forgetting the keyword link default. The legacy kernel's keyword inserts then fail in strict SQL mode.
- Rebuilding nothing. Clear the caches and rebuild the search index with
--clean; it is cheaper than checking.
Hands-on exercise
Part 1 is read-only on your training installation; part 2 is a planning exercise with chapter 16.6 open.
In the installation root, show the help of the schema comparison tool and find the options for the two schemas and for
--check-only:php bin/php/ezsqldiff.php --help(On a machine where you work as root, the script asks for
--allow-root-user.)Count the table entries in the reference schema file:
grep -c "^ '[a-z_0-9]*' => *$" share/db_schema.dbaThe file has one entry per table plus one
_infoentry; chapter 16.6.4 names 128 tables.Show the version rows your training database carries:
sqlite3 -readonly var/storage/sqlite3/exponential.db "SELECT name, value FROM ezsite_data WHERE name LIKE 'ezpublish-%';"Planning: an Ibexa 4.6 site on MySQL 8 has
ezrichtextin four content types, 120 fields ofezimageasset, three landing pages (ezlandingpage) and uses keywords. For each field type, write the decision from 16.6.3.Write the six database steps of 16.6.4 for this site, with the
ezsqldiff.phpcommand (made-up values for host, user and password) and the twogrepsanity checks.Write the three
ezsite_datastatements of step 5 and say why the old row is deleted first.The editors want to keep the Symfony admin for three months. Write which product line runs both kernels for the 4.6 generation and which bridge branch it uses (16.6.8).
Expected result
- Step 1 shows the options; step 3 shows
6.0.15stableand1on a current training installation. - Step 4: RichText converted (or kept and the output adapted);
ezimageassetchanged toezobjectrelation; landing pages rebuilt with Exponential Layouts and the field removed; keywords need theezkeyword_attribute_link.versiondefault. - Step 5:
share/db_schema.dbafirst, the database second;grep -c '^CREATE TABLE'large,grep '^DROP TABLE'only Symfony-side tables, which are removed while the Symfony stack may be needed. - Step 7: Platform Legacy
v4.6.23.x(or Nexus1.2.0.x), bridge branch4.x. - The trainer checks the order of step 5 and the direction of the
ezsqldiff.phpcommand on every sheet.
Quiz
ezsqldiff.php A Bprints SQL that turns which schema into which?- Your diff output contains
DROP TABLE ezbasket;. What went wrong? A. Nothing B. The arguments are the wrong way round C. The database is SQLite D. The schema file is old - Which field type keeps its value when changed to
ezobjectrelation, and why? - What must the column
ezkeyword_attribute_link.versionget after the MySQL 2.5 to 3.0 script, and why? - Name two things path B gains and two things it loses.
Answers
- It turns the second (
B) into the first (A) (chapter 16.6.4). - B.
DROP TABLElines may only list Symfony-side tables (chapter 16.6.4). ezimageasset: both keep the id of the target content item indata_int(chapter 16.6.3).- A default of 0, because the legacy kernel inserts keyword links without it and the insert fails in strict SQL mode (chapter 16.6.1 and 16.6.4, step 4).
- Gains, any two of: the legacy admin, TPL with overrides, legacy workflows, information collection, shop, newsletters, Exponential Layouts, Velocity, SQLite in production. Losses, any two of: the Symfony admin, Twig, REST v2 and GraphQL, Page Builder, Form Builder (chapter 16.6.2).
Further reading
- Chapter 16.6: Path B: the full path with configuration and templates.
- Exponential Platform Legacy: the hybrid, both directions.
- Legacy bridge: running both kernels on one database.
Related pages
- Module 6: From the Symfony-based platforms
- Migrating to Exponential: course overview
- Trainers: start here
- Free documentation: this page is free to copy, translate and improve under the GNU FDL 1.3.
Become an Exponential Partner
Partners share their information, provide funding, contribute back and develop the products with us, and that is how Exponential grows. A partner website and dashboard are planned for mid-2027: please become a partner today to speed up our growth rate and land new features faster.