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 @@