From f0fde60cf749cb18413217b6b24454704a7a3847 Mon Sep 17 00:00:00 2001 From: SamuelMoraesF Date: Mon, 29 Dec 2014 19:06:08 +0000 Subject: [PATCH 1/2] Migrating from heroku MySQL to PostgreSQL --- .env.heroku.php | 17 +++++++++++++++++ .gitignore | 3 +++ Procfile | 2 +- 3 files changed, 21 insertions(+), 1 deletion(-) create mode 100644 .env.heroku.php diff --git a/.env.heroku.php b/.env.heroku.php new file mode 100644 index 000000000..6715b791d --- /dev/null +++ b/.env.heroku.php @@ -0,0 +1,17 @@ + $dbURL['host'], + 'DB_DATABASE' => $dbName, + 'DB_USERNAME' => $dbURL['user'], + 'DB_PASSWORD' => $dbURL['pass'], + 'DB_DRIVER' => 'mysql', + +); + + + diff --git a/.gitignore b/.gitignore index f939b8e76..46d452a59 100644 --- a/.gitignore +++ b/.gitignore @@ -18,3 +18,6 @@ public/js/ npm-debug.log .vagrant/ tests/_output/* + +# Heroku +!.env.heroku.php diff --git a/Procfile b/Procfile index 0b03eba04..0e26515a0 100644 --- a/Procfile +++ b/Procfile @@ -1 +1 @@ -web: vendor/bin/heroku-php-nginx public +web: vendor/bin/heroku-php-apache2 public From 4803404808706c93779e80f49245bd3af5ce981d Mon Sep 17 00:00:00 2001 From: Graham Campbell Date: Mon, 29 Dec 2014 20:07:11 +0000 Subject: [PATCH 2/2] Fixes --- .env.heroku.php | 15 +++++---------- .gitignore | 4 +--- Procfile | 2 +- 3 files changed, 7 insertions(+), 14 deletions(-) diff --git a/.env.heroku.php b/.env.heroku.php index 6715b791d..8b2a91e82 100644 --- a/.env.heroku.php +++ b/.env.heroku.php @@ -1,17 +1,12 @@ $dbURL['host'], +return [ + 'DB_HOST' => $dbURL['host'], 'DB_DATABASE' => $dbName, 'DB_USERNAME' => $dbURL['user'], 'DB_PASSWORD' => $dbURL['pass'], - 'DB_DRIVER' => 'mysql', - -); - - - + 'DB_DRIVER' => 'pgsql', +]; diff --git a/.gitignore b/.gitignore index 46d452a59..44c43bb6b 100644 --- a/.gitignore +++ b/.gitignore @@ -7,6 +7,7 @@ .env.*.php .env.php config.codekit +!.env.heroku.php # Assets development /node_modules @@ -18,6 +19,3 @@ public/js/ npm-debug.log .vagrant/ tests/_output/* - -# Heroku -!.env.heroku.php diff --git a/Procfile b/Procfile index 0e26515a0..0b03eba04 100644 --- a/Procfile +++ b/Procfile @@ -1 +1 @@ -web: vendor/bin/heroku-php-apache2 public +web: vendor/bin/heroku-php-nginx public