@@ -95,14 +95,20 @@ not have any preconditions. These can be achieved, which prepares the environmen
95
95
for other objectives to be achievable, until all objectives are achieved and the
96
96
setup is completed.
97
97
98
+ [ ` DBUpdateSteps ` ] ( components/ILIAS/Database/interfaces/Setup/interface.ilDatabaseUpdateSteps.php )
99
+ are a special type of ` Objective ` . Their purpose is to change the database ** structure**
100
+ to a desired state, i.e. adding fields or changing field types. To change database
101
+ ** contents** , you can use ` Migrations ` .
102
+
98
103
99
104
### On Migration
100
105
101
106
Sometimes an update of an installation requires more work than simply downloading
102
107
fresh code and updating the database schema. When, e.g., the certificates where
103
108
moved to a new persistant storage model, a lot of data needed to be shuffled around.
104
109
This operation would potentially take a lot of time and thus was offloaded to be
105
- triggered by single users.
110
+ triggered by single users. A ` Migration ` is the right tool for this case, as its
111
+ purpose is to change the database ** contents** to a desired state.
106
112
107
113
The setup offers functionality for components to encapsulate these kind of operations
108
114
to allow administrators to monitor and also run them in a principled way. ` Agent ` s
@@ -115,6 +121,13 @@ These steps can then be triggered via the CLI and also be monitored there. It is
115
121
possible, that there are also other means to trigger the steps, such as an interaction
116
122
by the user. The first user of the migrations is the [ ` FileObject ` ] ( components/ILIAS/File/classes/Setup/class.ilFileObjectToStorageMigration.php ) .
117
123
124
+ Please keep in mind that a ` Migration ` should only have to be executed ** once** to
125
+ change existing data, which means that in parallel the code should be adapted so
126
+ that any new content is already stored in the "new" state. Besides that, the code
127
+ should also be able to handle date in the "old" state, as the ` Migration ` might
128
+ still be running while the system is already active. These code parts can then
129
+ safely be removed alongside the ` Migration ` itself with the next major version.
130
+
118
131
119
132
### On Artifact
120
133
0 commit comments