File tree Expand file tree Collapse file tree
user_guide_src/source/dbmgmt Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -9,9 +9,9 @@ need to go and run them. You would also have to keep track of which changes
99need to be run against the production machines next time you deploy.
1010
1111The 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
1515include 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
9595re-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*******************
109100Command-Line Tools
110101*******************
111102
112103CodeIgniter 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
114105that wish to use them. The tools primarily provide access to the same methods that are available within the MigrationRunner class.
115106
116107migrate
Load Diff This file was deleted.
You can’t perform that action at this time.
0 commit comments