Skip to content

Commit 998eb53

Browse files
committed
docs: remove Migrate controller sample
It is not recommended to use a controller for migration. Using CLI is recommended.
1 parent 017cdbd commit 998eb53

2 files changed

Lines changed: 4 additions & 33 deletions

File tree

user_guide_src/source/dbmgmt/migration.rst

Lines changed: 4 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,9 @@ need to go and run them. You would also have to keep track of which changes
99
need to be run against the production machines next time you deploy.
1010

1111
The database table **migrations** tracks which migrations have already been
12-
run so all you have to do is make sure your migrations are in place and
13-
call ``$migration->latest()`` to bring the database up to the most recent
14-
state. You can also use ``$migration->setNamespace(null)->latest()`` to
12+
run, so all you have to do is make sure your migrations are in place and
13+
run the ``spark migrate`` command to bring the database up to the most recent
14+
state. You can also use ``spark migrate --all`` to
1515
include migrations from all namespaces.
1616

1717
.. contents::
@@ -94,23 +94,14 @@ This will look for any migrations located at both **APPPATH/Database/Migrations*
9494
**ROOTPATH/MyCompany/Database/Migrations**. This makes it simple to include migrations in your
9595
re-usable, modular code suites.
9696

97-
*************
98-
Usage Example
99-
*************
100-
101-
In this example some simple code is placed in **app/Controllers/Migrate.php**
102-
to update the schema:
103-
104-
.. literalinclude:: migration/005.php
105-
10697
.. _command-line-tools:
10798

10899
*******************
109100
Command-Line Tools
110101
*******************
111102

112103
CodeIgniter ships with several :doc:`commands </cli/spark_commands>` that are available from the command line to help
113-
you work with migrations. These tools are not required to use migrations but might make things easier for those of you
104+
you work with migrations. These tools make things easier for those of you
114105
that wish to use them. The tools primarily provide access to the same methods that are available within the MigrationRunner class.
115106

116107
migrate

user_guide_src/source/dbmgmt/migration/005.php

Lines changed: 0 additions & 20 deletions
This file was deleted.

0 commit comments

Comments
 (0)