summaryrefslogtreecommitdiffstats
path: root/application/migrations/002_add_users.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/002_add_users.php
parent33f542487a89da4a8edad934b82aae7484f70ca3 (diff)
Correcting bracket style for 'if'
Diffstat (limited to 'application/migrations/002_add_users.php')
-rw-r--r--application/migrations/002_add_users.php16
1 files changed, 6 insertions, 10 deletions
diff --git a/application/migrations/002_add_users.php b/application/migrations/002_add_users.php
index d74402263..322415d9b 100644
--- a/application/migrations/002_add_users.php
+++ b/application/migrations/002_add_users.php
@@ -5,8 +5,7 @@ class Migration_Add_users extends CI_Migration {
public function up()
{
- if ($this->db->dbdriver == 'postgre')
- {
+ if ($this->db->dbdriver == 'postgre') {
$this->db->query('
CREATE TABLE IF NOT EXISTS "users" (
"id" serial PRIMARY KEY,
@@ -32,9 +31,9 @@ class Migration_Add_users extends CI_Migration {
ALTER TABLE "files" ADD "user" integer NOT NULL DEFAULT 0;
CREATE INDEX "user_idx" ON "files" ("user");
');
- }
- else
- {
+
+ } else {
+
$this->db->query("
CREATE TABLE IF NOT EXISTS `users` (
`id` int(8) UNSIGNED NOT NULL AUTO_INCREMENT,
@@ -69,12 +68,9 @@ class Migration_Add_users extends CI_Migration {
{
$this->dbforge->drop_table('users');
$this->dbforge->drop_table('ci_sessions');
- if ($this->db->dbdriver == 'postgre')
- {
+ if ($this->db->dbdriver == 'postgre') {
$this->db->query('ALTER TABLE "files" DROP "user"');
- }
- else
- {
+ } else {
$this->db->query('ALTER TABLE `files` DROP `user`');
}
}