summaryrefslogtreecommitdiffstats
path: root/application/migrations
diff options
context:
space:
mode:
authorFlorian Pritz <bluewind@xinu.at>2014-10-19 23:01:51 +0200
committerFlorian Pritz <bluewind@xinu.at>2014-10-19 23:01:51 +0200
commit1abe7372404a9d65f3b59eda2d83e628267b366d (patch)
treee9820b18cb65240bb9549b5ed7ac78cc1d6cc59d /application/migrations
parentdbb2247b82ab49c50f424c904ac98702507f1a8e (diff)
Clean up the postgres changes
Style cleanup and some regression fixes Signed-off-by: Florian Pritz <bluewind@xinu.at>
Diffstat (limited to 'application/migrations')
-rw-r--r--application/migrations/001_add_files.php7
-rw-r--r--application/migrations/003_add_referrers.php3
-rw-r--r--application/migrations/007_repurpose_invitations.php3
3 files changed, 4 insertions, 9 deletions
diff --git a/application/migrations/001_add_files.php b/application/migrations/001_add_files.php
index 70efbb520..30f567325 100644
--- a/application/migrations/001_add_files.php
+++ b/application/migrations/001_add_files.php
@@ -5,8 +5,7 @@ class Migration_Add_files extends CI_Migration {
public function up()
{
- if ($this->db->dbdriver == 'postgre')
- {
+ if ($this->db->dbdriver == 'postgre') {
$this->db->query('
CREATE TABLE IF NOT EXISTS "files" (
"hash" varchar(32) NOT NULL,
@@ -20,9 +19,7 @@ class Migration_Add_files extends CI_Migration {
CREATE INDEX "files_date_idx" ON files ("date");
CREATE INDEX "files_hash_id_idx" ON files ("hash", "id");
');
- }
- else
- {
+ } else {
$this->db->query("
CREATE TABLE IF NOT EXISTS `files` (
`hash` varchar(32) CHARACTER SET ascii NOT NULL,
diff --git a/application/migrations/003_add_referrers.php b/application/migrations/003_add_referrers.php
index 9ca167eab..e30f1faef 100644
--- a/application/migrations/003_add_referrers.php
+++ b/application/migrations/003_add_referrers.php
@@ -42,8 +42,7 @@ class Migration_Add_referrers extends CI_Migration {
public function down()
{
- if ($this->db->dbdriver == 'postgre')
- {
+ if ($this->db->dbdriver == 'postgre') {
$this->db->query('
ALTER TABLE "users" DROP "referrer"
');
diff --git a/application/migrations/007_repurpose_invitations.php b/application/migrations/007_repurpose_invitations.php
index 024b62984..fb40e8179 100644
--- a/application/migrations/007_repurpose_invitations.php
+++ b/application/migrations/007_repurpose_invitations.php
@@ -42,8 +42,7 @@ class Migration_Repurpose_invitations extends CI_Migration {
public function down()
{
- if ($this->db->dbdriver == 'postgre')
- {
+ if ($this->db->dbdriver == 'postgre') {
$this->db->query('ALTER TABLE "actions" RENAME TO "invitations"');
$this->db->query('
ALTER TABLE "invitations"