@@ -77,9 +77,9 @@ for the file where the database will be created using the ``--ext`` option. Vali
7777 produce a success message but no database file is created. This is because SQLite3 will just use
7878 an in-memory database.
7979
80- ****************************
81- Creating and Dropping Tables
82- ****************************
80+ ***************
81+ Creating Tables
82+ ***************
8383
8484There are several things you may wish to do when creating tables. Add
8585fields, add keys to the table, alter columns. CodeIgniter provides a
@@ -176,10 +176,6 @@ and unique keys with specific methods:
176176
177177.. note :: When you add a primary key, MySQL and SQLite will assume the name ``PRIMARY`` even if a name is provided.
178178
179- You may add keys to an existing table by using ``processIndexes() ``:
180-
181- .. literalinclude :: forge/029.php
182-
183179.. _adding-foreign-keys :
184180
185181Adding Foreign Keys
@@ -216,6 +212,10 @@ You could also pass optional table attributes, such as MySQL's ``ENGINE``:
216212 ``createTable() `` will always add them with your configured *charset *
217213 and *DBCollat * values, as long as they are not empty (MySQL only).
218214
215+ ***************
216+ Dropping Tables
217+ ***************
218+
219219Dropping a Table
220220================
221221
@@ -228,6 +228,10 @@ drivers to handle removal of tables with foreign keys.
228228
229229.. literalinclude :: forge/018.php
230230
231+ ****************
232+ Modifying Tables
233+ ****************
234+
231235Dropping a Foreign Key
232236======================
233237
@@ -236,7 +240,7 @@ Execute a DROP FOREIGN KEY.
236240.. literalinclude :: forge/019.php
237241
238242Dropping a Key
239- ======================
243+ ===============
240244
241245Execute a DROP KEY.
242246
@@ -260,10 +264,6 @@ Executes a TABLE rename
260264
261265.. literalinclude :: forge/021.php
262266
263- ****************
264- Modifying Tables
265- ****************
266-
267267Adding a Column to a Table
268268==========================
269269
@@ -284,7 +284,7 @@ Examples:
284284.. literalinclude :: forge/023.php
285285
286286Dropping Columns From a Table
287- ==============================
287+ =============================
288288
289289.. _db-forge-dropColumn :
290290
@@ -311,6 +311,15 @@ change the name, you can add a "name" key into the field defining array.
311311
312312.. literalinclude :: forge/026.php
313313
314+ Adding Keys to a Table
315+ ======================
316+
317+ .. versionadded :: 4.3.0
318+
319+ You may add keys to an existing table by using ``processIndexes() ``:
320+
321+ .. literalinclude :: forge/029.php
322+
314323***************
315324Class Reference
316325***************
0 commit comments