Skip to content
Products
Solutions
Docs
Pricing
Blog
Log in
Log in
Sign up
Sign up
Products
Solutions
Docs
Pricing
Blog
Docs
Docs
Getting Started
On this page

Database Migrations

On a UNA site that runs straight from the code repository, set the dev update channel once with php periodic/migration.php --channel=dev, then run php periodic/migration.php after every code update to apply the database changes the new code needs.
Android
iOS
Web
Core
~15.0
Source
Copy Page
Note
php periodic/migration.php --channel=dev
php periodic/migration.php --status
php periodic/migration.php
-- UNA-Migration-Min-System-Version: 15.0.0-RC3
-- UNA-Migration-Min-System-Version: 15.0.0-RC3
-- The update channel gets a third value, dev: a site on it runs every migration in its files.
UPDATE `sys_options` SET `extra` = 'stable,beta,dev' WHERE `name` = 'sys_upgrade_channel' AND `extra` = 'stable,beta';
docker compose exec -w /opt/una php php periodic/migration.php --check
docker compose exec -w /opt/una php php periodic/migration.php --channel=dev
docker compose exec -w /opt/una php php periodic/migration.php
docker compose exec -w /opt/una php ./plugins/bin/phpunit -c tests/phpunit.xml --filter MigrationsDbTest
9d
On this page
I want toHow migrations workUpdate channelsPut a site on the dev channelUpdate a site from the repositoryCommandsWrite a migrationTest a migrationTipsTroubleshootingGitHub SourcesRelated
Introduction
Getting Started
License
Concepts
Architecture
Requirements
Server configuration
Installation
Deployment
Releases
Upgrades
NEO
Glossary
Roadmap
Database Migrations
Configuration
Apps
CODE
Auth
Connect
-- UNA-Migration-Min-System-Version: 15.0.0-RC3
-- The update channel gets a third value, dev: a site on it runs every migration in its files.
UPDATE `sys_options` SET `extra` = 'stable,beta,dev' WHERE `name` = 'sys_upgrade_channel' AND `extra` = 'stable,beta';