What this solution does
The module simplifies the transfer and analysis of database structure changes between project copies.
Key features:
- Migration management: creation, deletion, installation, and rollback.
- Analysis and display of differences between current database entity settings and existing migrations, with the ability to automatically generate new migrations based on these discrepancies.
- Intuitive API for describing migrations.
The current version supports:
- Information blocks and universal lists (with some limitations).
- MySQL database tables.
- User fields.
- Bitrix24 smart processes.
Quick start guide:
After installing the module, a 'Migrations' item appears in the administrative menu. This section displays a list of migration files and their status (Installed: Yes/No). The following actions are available for each file:
- Show changes — displays the changes introduced by the migration.
- Install — executes the Up method.
- Rollback — executes the Down method.
- Mark as 'Installed'/'Not Installed' — useful when changes are already present in the system and installation or rollback is not required.
The ITEM migration management module enables creation, loading, and application of data structure changes. Action panel functions include creating an empty migration file with Up/Down methods for manual configuration, loading an existing migration file, installing all available migrations, and performing a full rollback. Operations for downloading and deleting migration files are also supported.
The Information Blocks section displays a list of all registered blocks. Migration status for each block is defined as follows: 'API symbolic code not specified' indicates the module does not support blocks lacking this parameter; 'Not used' signifies no participation in migrations; 'All migrations installed' confirms full alignment between system settings and migration files; 'Discrepancies exist' signals differences between current configuration and migrations; 'Information block deleted' means the block exists in migrations but is absent from the system; 'Uninstalled migrations exist' indicates pending changes.
For supported information blocks, action menu options include viewing discrepancies with the ability to create or download a new migration, and displaying the complete list of migrations affecting the specific block.
The Migrations section manages synchronization of the data structure between the system and migration files. The interface is divided into two parts: custom fields and tables.
The custom fields list displays the status of each entity. Possible statuses are:
- Not used: the field is not involved in migrations.
- All migrations installed: the current field configuration in the system matches the data in migration files.
- Differences exist: field settings in the system differ from those recorded in migrations.
- Field deleted: the entity exists in migration files but is missing from the system.
- Uninstalled migrations exist: the system lacks some changes from migration files.
Each element offers a menu of actions:
- Show differences: displays discrepancies for which a new migration can be created or downloaded.
- Show migrations: lists all migrations affecting this field.
The Tables section contains a similar list of core data structures. Statuses follow the same logic, adapted for tables:
- Not used: the table is not involved in migrations.
- All migrations installed: the table structure in the system matches the migrations.
- Differences exist: the table configuration in the system differs from the migrations.
- Table deleted: the table exists in migrations but is missing from the system.
- Uninstalled migrations exist: the system has not applied all changes from migration files.
Each table also provides a menu of actions to view discrepancies and the list of associated migrations.
ITEM: Migrations module tracks the status of changes in data structure and smart processes.
For tables, two functions are available: displaying discrepancies for which a new migration can be created or downloaded, and listing all migrations involving a specific table.
The smart processes section displays their status:
- Not used: the process is not involved in migrations.
- All migrations installed: changes in migrations match the current system configuration.
- Discrepancies exist: smart process settings or field composition in the system differ from the migration data.
- Smart process deleted: the process exists in migrations but is missing from the system.
- Uninstalled migrations exist.
Each item has an action menu: view discrepancies to create a new migration, or view the list of all migrations involving that smart process.
On the discrepancies page, automated migration creation is available. The system creates a new file and places it in the folder specified in the module settings. It is also possible to download a migration for the specified discrepancies without creating a migration file.
General iT can install and configure this module and check how it works on your website.