- Add a database table A migration that creates a table of the site's own on every engine from a share/db_schema.dba definition, writes a first row, and drops it again in down() - with the dry run, the run, the checks and the rollback.
- PHP Developers: start here Where PHP developers start - what Exponential is as a PHP code base, your first hour, the rules every PHP change follows, and a map of every page for PHP developers, from the request life cycle and PHP 8.0 compatibility…
- Create or change a content class A migration that creates the content class news_article with its attributes and class group, the same way on development, staging and production, and the pattern for changing a class (its name, its name pattern) in a…
- Change content in bulk A migration that walks every object of a class in batches, publishes a new version of each one that needs the change, commits per object, logs its progress and is safe to run again - the pattern for any change to many…
- Testing migrations: check, simulate, diff and CI Four layers of tests for migrations - the lint without a database, the dry run, the simulation with a diff on PostgreSQL or SQLite, and a PHPUnit test on a throwaway SQLite database - and how to run them in CI.
- Team workflow with git: branches, conflicts and order How several developers write migrations on branches without stepping on each other - timestamps and order, requires for real dependencies, two migrations with the same timestamp, rebasing, renaming only before a merge…
- Upgrade step or migration? When a change belongs in an upgrade step that exp:upgrade applies to every installation of the kernel or an extension, and when in a migration of one site; how the upgrade steps appear among the migrations, and how a…
- Coming from Doctrine Migrations For developers who know Doctrine Migrations from Symfony projects - every Doctrine command and class mapped to its Exponential 6 counterpart, what Exponential adds (captions, commit, tag and push, environments…
- Migrations: frequently asked questions Short answers to the questions people ask about migrations in Exponential 6.0.15 - what they are for, how they differ from upgrades and site moves, how runs, captions, rollback, environments, teams, CI, engines…
- Writing migrations in PHP A hands-on page for PHP developers - the migration class and its namespace, the context API, references between migrations, exceptions and transactions per engine, the kernel APIs a migration uses, one complete example…
- Migrations The start of everything about migrations in Exponential 6.0.15 - schema and content changes written once as files under version control and applied to every installation of a site in the same order, with a caption…
- Add a column or an index A migration that adds a column with a default and an index to an existing table on every SQL engine, through the engine's own schema handler, checks the catalog first so it completes a half-applied change, and drops…
- Add a class attribute A migration that adds the attribute subtitle to the class news_article at the right position, gives every existing object the new field, and removes attribute and values again in down().
- The PHP developer's reading path Every page of the PHP developers section in a recommended reading order, in six stages from orientation to contributing, with the time each stage takes and what you can do after it.
- Fix data A migration that corrects wrong rows - names with stray spaces, addresses over http - with a pure function that the plan, the run and a test share, escaped SQL through the run's connection, and the old values in the run…
- Move or rename INI settings A PHP migration that moves settings of an installation's override from site.ini to a file of their own and renames one on the way, keeps the value of each installation, writes the new file before it removes the old…
- Add roles and policies A migration that creates the role News editor with its policies, limits two of them to the class news_article, assigns it to the user group Editors found by remote id, and removes role, policies and assignment in down().
- Seed content for a new site A migration that publishes the starting content of a site - a folder and its first articles - by remote id, only what is missing, in the language of the content root, so every new installation and every developer's copy…
- Exponential for PHP developers What a PHP developer meets in Exponential - a large, mature PHP code base with its own conventions, generated class maps, layered INI settings, persistent objects and a template engine - and how it differs from a…
- Migrations in an extension or package Ship migrations inside an extension (extension/<name>/migrations/) or an installed package, generate them with --source=extension:<name>, and make a site's migrations wait for them with requires.
Documentation license
This documentation is free documentation, licensed under the GNU Free Documentation License 1.3 or later.
Exponential Copyright © 1998-2026 Exponential Foundation and 7x