diff options
author | Derek Jones <derek.jones@ellislab.com> | 2011-07-02 00:40:48 +0200 |
---|---|---|
committer | Derek Jones <derek.jones@ellislab.com> | 2011-07-02 00:40:48 +0200 |
commit | 4b9c62980599228f070b401c7673dce8085b0c61 (patch) | |
tree | 314bd87831a09913cbbfd1ffe1447b3c38b394c5 /user_guide/database/forge.html | |
parent | 114ab0988e20ac6be39ad363ff897a1a3b85e565 (diff) |
backed out 648b42a75739, which was a NON-trivial whitespace commit. It broke the Typography class's string replacements, for instance
Diffstat (limited to 'user_guide/database/forge.html')
-rw-r--r-- | user_guide/database/forge.html | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/user_guide/database/forge.html b/user_guide/database/forge.html index bbef053e4..cad2cf26f 100644 --- a/user_guide/database/forge.html +++ b/user_guide/database/forge.html @@ -151,7 +151,7 @@ already be running, since the forge class relies on it.</p> ),<br /> );<br /> </code></p> -<p>After the fields have been defined, they can be added using <dfn>$this->dbforge->add_field($fields);</dfn> followed by a call to the <dfn>create_table()</dfn> function.</p> +<p>After the fields have been defined, they can be added using <dfn>$this->dbforge->add_field($fields);</dfn> followed by a call to the <dfn>create_table()</dfn> function.</p> <h3>$this->dbforge->add_field()</h3> <p>The add fields function will accept the above array.</p> <h3>Passing strings as fields</h3> @@ -164,7 +164,7 @@ already be running, since the forge class relies on it.</p> // gives id INT(9) NOT NULL AUTO_INCREMENT</code></p> <h2><a name="add_key" id="add_key"></a>Adding Keys</h2> <p>Generally speaking, you'll want your table to have Keys. This is accomplished with <dfn>$this->dbforge->add_key('field')</dfn>. An optional second parameter set to TRUE will make it a primary key. Note that <dfn>add_key()</dfn> must be followed by a call to <dfn>create_table()</dfn>.</p> -<p>Multiple column non-primary keys must be sent as an array. Sample output below is for MySQL.</p> +<p>Multiple column non-primary keys must be sent as an array. Sample output below is for MySQL.</p> <p><code>$this->dbforge->add_key('blog_id', TRUE);<br /> // gives PRIMARY KEY `blog_id` (`blog_id`)<br /> <br /> @@ -187,7 +187,7 @@ already be running, since the forge class relies on it.</p> <h2><a name="drop_table" id="drop_table"></a>Dropping a table</h2> <p>Executes a DROP TABLE sql</p> <p><code>$this->dbforge->drop_table('table_name');<br /> - // gives DROP TABLE IF EXISTS table_name</code></p> + // gives DROP TABLE IF EXISTS table_name</code></p> <h2><a name="rename_table" id="rename_table"></a>Renaming a table</h2> <p>Executes a TABLE rename</p> <p><code>$this->dbforge->rename_table('old_table_name', 'new_table_name');<br /> @@ -200,7 +200,7 @@ already be running, since the forge class relies on it.</p> );<br /> $this->dbforge->add_column('table_name', $fields);<br /> <br /> -// gives ALTER TABLE table_name ADD preferences TEXT</code></p> +// gives ALTER TABLE table_name ADD preferences TEXT</code></p> <h2>$this->dbforge->drop_column()</h2> <p>Used to remove a column from a table. </p> <p><code>$this->dbforge->drop_column('table_name', 'column_to_drop');</code></p> @@ -214,7 +214,7 @@ $this->dbforge->add_column('table_name', $fields);<br /> );<br /> $this->dbforge->modify_column('table_name', $fields);<br /> <br /> - // gives ALTER TABLE table_name CHANGE old_name new_name TEXT </code></p> + // gives ALTER TABLE table_name CHANGE old_name new_name TEXT </code></p> <p> </p> </div> <!-- END CONTENT --> |