summaryrefslogtreecommitdiffstats
path: root/application/migrations/002_add_users.php
diff options
context:
space:
mode:
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`');
}
}