From 2e627d7a88aed82363a7ad48dab21b2b55797452 Mon Sep 17 00:00:00 2001 From: Florian Pritz Date: Sun, 20 Sep 2015 15:46:09 +0200 Subject: postgres: Add missing prefix to index creation Signed-off-by: Florian Pritz --- application/migrations/012_add_constraints.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'application/migrations/012_add_constraints.php') diff --git a/application/migrations/012_add_constraints.php b/application/migrations/012_add_constraints.php index 40a4540f6..a2569d54d 100644 --- a/application/migrations/012_add_constraints.php +++ b/application/migrations/012_add_constraints.php @@ -10,7 +10,7 @@ class Migration_add_constraints extends CI_Migration { if ($this->db->dbdriver == 'postgre') { $this->db->query('ALTER TABLE "'.$prefix.'users" ALTER COLUMN "referrer" TYPE integer'); $this->db->query('ALTER TABLE "'.$prefix.'users" ALTER COLUMN "referrer" DROP NOT NULL'); - $this->db->query('CREATE INDEX "users_referrer_idx" ON "'.$prefix.'users" ("referrer")'); + $this->db->query('CREATE INDEX "'.$prefix.'users_referrer_idx" ON "'.$prefix.'users" ("referrer")'); $this->db->query('UPDATE "'.$prefix.'users" SET "referrer" = NULL where "referrer" = 0'); $this->db->query(' ALTER TABLE "'.$prefix.'users" -- cgit v1.2.3-24-g4f1b