summaryrefslogtreecommitdiffstats
path: root/user_guide_src
diff options
context:
space:
mode:
Diffstat (limited to 'user_guide_src')
-rw-r--r--user_guide_src/source/database/forge.rst10
-rw-r--r--user_guide_src/source/installation/upgrade_300.rst8
2 files changed, 10 insertions, 8 deletions
diff --git a/user_guide_src/source/database/forge.rst b/user_guide_src/source/database/forge.rst
index 646e3a56e..5af4f2248 100644
--- a/user_guide_src/source/database/forge.rst
+++ b/user_guide_src/source/database/forge.rst
@@ -97,6 +97,7 @@ Additionally, the following key/values can be used:
- auto_increment/true : generates an auto_increment flag on the
field. Note that the field type must be a type that supports this,
such as integer.
+- unique/true : to generate a unique key for the field definition.
::
@@ -110,6 +111,7 @@ Additionally, the following key/values can be used:
'blog_title' => array(
'type' => 'VARCHAR',
'constraint' => '100',
+ 'unique' => TRUE,
),
'blog_author' => array(
'type' =>'VARCHAR',
@@ -175,14 +177,14 @@ below is for MySQL.
$this->dbforge->add_key('blog_id', TRUE);
// gives PRIMARY KEY `blog_id` (`blog_id`)
-
+
$this->dbforge->add_key('blog_id', TRUE);
$this->dbforge->add_key('site_id', TRUE);
// gives PRIMARY KEY `blog_id_site_id` (`blog_id`, `site_id`)
-
+
$this->dbforge->add_key('blog_name');
// gives KEY `blog_name` (`blog_name`)
-
+
$this->dbforge->add_key(array('blog_name', 'blog_label'));
// gives KEY `blog_name_blog_label` (`blog_name`, `blog_label`)
@@ -261,7 +263,7 @@ number of additional fields.
$fields = array(
'preferences' => array('type' => 'TEXT')
);
- $this->dbforge->add_column('table_name', $fields);
+ $this->dbforge->add_column('table_name', $fields);
// Executes: ALTER TABLE table_name ADD preferences TEXT
If you are using MySQL or CUBIRD, then you can take advantage of their
diff --git a/user_guide_src/source/installation/upgrade_300.rst b/user_guide_src/source/installation/upgrade_300.rst
index 45ce21320..9a40f2b60 100644
--- a/user_guide_src/source/installation/upgrade_300.rst
+++ b/user_guide_src/source/installation/upgrade_300.rst
@@ -65,7 +65,7 @@ Step 3: Replace config/mimes.php
********************************
This config file has been updated to contain more user mime-types, please copy
-it to _application/config/mimes.php*.
+it to *application/config/mimes.php*.
**************************************************************
Step 4: Remove $autoload['core'] from your config/autoload.php
@@ -206,13 +206,13 @@ Step 8: Replace your error templates
************************************
In CodeIgniter 3.0, the error templates are now considered as views and have been moved to the
-_application/views/errors* directory.
+*application/views/errors* directory.
Furthermore, we've added support for CLI error templates in plain-text format that unlike HTML,
is suitable for the command line. This of course requires another level of separation.
-It is safe to move your old templates from _application/errors* to _application/views/errors/html*,
-but you'll have to copy the new _application/views/errors/cli* directory from the CodeIgniter archive.
+It is safe to move your old templates from *application/errors* to *application/views/errors/html*,
+but you'll have to copy the new *application/views/errors/cli* directory from the CodeIgniter archive.
******************************************
Step 9: Update your config/routes.php file