In Aimeos, setup tasks are responsible for creating the database schema, updating the schema if necessary and migrating data required due to schema changes. They have to perform their tasks for all supported databases.
The setup tasks have a lot of advantages and exceed the possibilities of other available solutions like "Object-relational mapping" (ORM) or similar alternatives to setup tasks:
- The database structure is stored in the version control system
- For every commit there can be a suitable database structure created
- Everyone can update their existing database to a newer version
- Updates are possible from any commit, not only from released versions
- Data transformation is possible via PHP code if SQL is not enough
- They can declare dependencies to other tasks
- The tasks are prepared to support several database vendors
They are also used to write the default and unit test data to the database during the setup process.
Table of content