summaryrefslogtreecommitdiffstats
path: root/application/migrations/006_add_username_index.php
diff options
context:
space:
mode:
authorRafael Bodill <rafi@sortex.co.il>2014-09-18 21:47:21 +0200
committerRafael Bodill <rafi@sortex.co.il>2014-09-18 21:47:21 +0200
commitfe7f15dbfb8020daf96110e86e359ec01558fcb8 (patch)
tree60f59922c52d1607cd7c8ebbdb48b8b6101d2648 /application/migrations/006_add_username_index.php
parent33f542487a89da4a8edad934b82aae7484f70ca3 (diff)
Correcting bracket style for 'if'
Diffstat (limited to 'application/migrations/006_add_username_index.php')
-rw-r--r--application/migrations/006_add_username_index.php14
1 files changed, 4 insertions, 10 deletions
diff --git a/application/migrations/006_add_username_index.php b/application/migrations/006_add_username_index.php
index a7ad236f3..5b8c3584f 100644
--- a/application/migrations/006_add_username_index.php
+++ b/application/migrations/006_add_username_index.php
@@ -5,14 +5,11 @@ class Migration_Add_username_index extends CI_Migration {
public function up()
{
- if ($this->db->dbdriver == 'postgre')
- {
+ if ($this->db->dbdriver == 'postgre') {
$this->db->query('
CREATE UNIQUE INDEX "users_username_idx" ON "users" ("username")
');
- }
- else
- {
+ } else {
$this->db->query("
ALTER TABLE `users`
ADD UNIQUE `username` (`username`);
@@ -22,12 +19,9 @@ class Migration_Add_username_index extends CI_Migration {
public function down()
{
- if ($this->db->dbdriver == 'postgre')
- {
+ if ($this->db->dbdriver == 'postgre') {
$this->db->query('DROP INDEX "users_username_idx"');
- }
- else
- {
+ } else {
$this->db->query("
ALTER TABLE `users`
DROP INDEX `username`;