From 1b449f2f47490ff688a99c8f1d6efd0171fe09ff Mon Sep 17 00:00:00 2001 From: Bekir Eldem Date: Thu, 22 Mar 2018 12:13:07 +0300 Subject: [PATCH] New branch (#4) * update the readme * update app.json * update app.json * update app.json * update app.json * update app.json * Update app.json * update database config * return to old database.php config * change to responsive database.php config * update deploy script * update deploy script * clear temp files * remove unnecessary if array condition for single effort view * update migration down function --- bin/deploy.sh | 3 +- config/database.php | 22 ++++++++++-- ...03_18_213149_create_effort_times_table.php | 2 +- ...03_18_213149_create_effort_times_table.php | 34 ------------------- resources/views/an_effort.blade.php | 7 +--- 5 files changed, 24 insertions(+), 44 deletions(-) delete mode 100644 database/migrations/tmp/2018_03_18_213149_create_effort_times_table.php diff --git a/bin/deploy.sh b/bin/deploy.sh index df37350..60b2550 100644 --- a/bin/deploy.sh +++ b/bin/deploy.sh @@ -1,2 +1,3 @@ # Sync database changes -php artisan migrate -n --force +php artisan migrate:refresh -n --force +php artisan cache:clear diff --git a/config/database.php b/config/database.php index 2ac9138..151c812 100644 --- a/config/database.php +++ b/config/database.php @@ -8,8 +8,14 @@ $username = $url['user']; $password = $url['pass']; $database = substr($url['path'], 1); +} else { + $host = env('DB_HOST', 'localhost'); + $username = env('DB_USERNAME', 'forge'); + $password = env('DB_PASSWORD', ''); + $database = env('DB_DATABASE', 'forge'); } + return [ /* @@ -75,7 +81,20 @@ 'strict' => true, 'engine' => null, ], - +/* + 'pgsql' => [ + 'driver' => 'pgsql', + 'host' => $host, //env('DB_HOST', 'localhost'), + 'port' => env('DB_PORT', '5432'), + 'database' => env('DB_DATABASE', 'forge'), + 'username' => env('DB_USERNAME', 'forge'), + 'password' => env('DB_PASSWORD', ''), + 'charset' => 'utf8', + 'prefix' => '', + 'schema' => 'public', + 'sslmode' => 'prefer', + ], +*/ 'pgsql' => [ 'driver' => 'pgsql', 'host' => $host, //env('DB_HOST', 'localhost'), @@ -88,7 +107,6 @@ 'schema' => 'public', 'sslmode' => 'prefer', ], - ], /* diff --git a/database/migrations/2018_03_18_213149_create_effort_times_table.php b/database/migrations/2018_03_18_213149_create_effort_times_table.php index d993582..c2cc622 100644 --- a/database/migrations/2018_03_18_213149_create_effort_times_table.php +++ b/database/migrations/2018_03_18_213149_create_effort_times_table.php @@ -29,6 +29,6 @@ public function up() */ public function down() { - Schema::dropIfExists('sleeps'); + Schema::dropIfExists('effort_times'); } } diff --git a/database/migrations/tmp/2018_03_18_213149_create_effort_times_table.php b/database/migrations/tmp/2018_03_18_213149_create_effort_times_table.php deleted file mode 100644 index bc8a1ce..0000000 --- a/database/migrations/tmp/2018_03_18_213149_create_effort_times_table.php +++ /dev/null @@ -1,34 +0,0 @@ -increments('id'); - $table->integer('user_id'); - $table->integer('effort_id'); - $table->dateTime('begin_date')->nullable(); - $table->dateTime('end_date')->nullable(); - }); - } - - /** - * Reverse the migrations. - * - * @return void - */ - public function down() - { - Schema::dropIfExists('sleeps'); - } -} diff --git a/resources/views/an_effort.blade.php b/resources/views/an_effort.blade.php index 4100ab9..31db802 100644 --- a/resources/views/an_effort.blade.php +++ b/resources/views/an_effort.blade.php @@ -50,7 +50,6 @@
Times Spent
- @if (count($effort) > 0) {{-- @@ -82,11 +81,7 @@
- Add a effort - - @else - There is no efforts yet. Add a effort! - @endif + Add another effort
{{-- Efforts End --}}