You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: developer_manual/digging_deeper/repair.rst
+22-1Lines changed: 22 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,3 +1,5 @@
1
+
.. _migration-repair-steps:
2
+
1
3
============
2
4
Repair steps
3
5
============
@@ -15,7 +17,7 @@ Creating a repair step
15
17
16
18
A repair step is an implementation of the ``OCP\Migration\IRepairStep`` interface.
17
19
By convention these classes are placed in the **lib/Migration** directory.
18
-
The following repairstep will log a message when executed.
20
+
The following repair step will log a message when executed.
19
21
20
22
.. code-block:: php
21
23
@@ -113,3 +115,22 @@ The following repair steps are available:
113
115
* ``pre-migration`` This repair step will be executed just before the database is migrated during an update of the app.
114
116
* ``post-migration`` This repair step will be executed just after the database is migrated during an update of the app. This repair step will also be executed when running the ``occ maintenance:repair`` command
115
117
* ``live-migration`` This repair step will be scheduled to be run in the background (e.g. using cron), therefore it is unpredictable when it will run. If the job isn't required right after the update of the app and the job would take a long time this is the best choice.
118
+
119
+
Expensive repair steps
120
+
----------------------
121
+
122
+
Expensive repair steps are non-critical repair steps that might take a long time to execute.
123
+
Non-critical means that they are not required to directly be executed during migration to have a working instance,
124
+
but they might be required to have a fully working instance later on.
125
+
126
+
Expensive repair steps are only executed when explicitly requested by the administrator
127
+
when using the ``occ maintenance:repair`` command, by passing the ``--include-expensive`` flag.
128
+
129
+
.. note:: Expensive repair steps can only be used for ``post-migration`` repair steps, as the other types are executed during (un-)installation of the app and therefore should not take a long time.
130
+
131
+
Creating an expensive repair step
132
+
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
133
+
134
+
Expensive repair steps are created the same way as normal repair steps as seen in the example above.
135
+
But they have to implement the ``\OCP\Migration\IRepairStepExpensive`` interface
136
+
instead of the ``\OCP\Migration\IRepairStep`` interface.
0 commit comments