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: user_guide_src/source/dbmgmt/migration.rst
+7-3Lines changed: 7 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -10,7 +10,7 @@ need to be run against the production machines next time you deploy.
10
10
11
11
The database table **migration** tracks which migrations have already been
12
12
run so all you have to do is make sure your migrations are in place and
13
-
call ``$migration->progress()`` to bring the database up to the most recent
13
+
call ``$migration->latest()`` to bring the database up to the most recent
14
14
state. You can also use ``$migration->setNamespace(null)->progess()`` to
15
15
include migrations from all namespaces.
16
16
@@ -199,6 +199,10 @@ This example will migrate Blog namespace with any new migrations on the test dat
199
199
200
200
> php spark migrate -g test -n Blog
201
201
202
+
When using the `-all` option, it will scan through all namespaces attempting to find any migrations that have
203
+
not been ran. These will all be collected and then sorted as a group by date created. This should help
204
+
to minimize any potential conflicts between the main application and any modules.
205
+
202
206
**rollback**
203
207
204
208
Rolls back all migrations, taking the database group to a blank slate, effectively migration 0::
@@ -275,15 +279,15 @@ Class Reference
275
279
276
280
An array of migration filenames are returned that are found in the **path** property.
277
281
278
-
.. php:method::progress($group)
282
+
.. php:method::latest($group)
279
283
280
284
:param mixed $group: database group name, if null default database group will be used.
281
285
:returns: TRUE on success, FALSE on failure
282
286
:rtype: bool
283
287
284
288
This locates migrations for a namespace (or all namespaces), determines which migrations
285
289
have not yet been run, and runs them in order of their version (namespaces intermingled).
286
-
290
+
287
291
.. php:method:: regress($batch, $group)
288
292
289
293
:param mixed $batch: previous batch to migrate down to; 1+ specifies the batch, 0 reverts all, negative refers to the relative batch (e.g. -3 means "three batches back")
0 commit comments