From 9a434f380a8c444e25a423ed08023f67200b620a Mon Sep 17 00:00:00 2001 From: Vincent Vanwaelscappel Date: Mon, 15 Jun 2020 21:17:16 +0200 Subject: [PATCH] wip #3707 @0.5 --- app/Console/Commands/ExtranetMigration.php | 2 ++ app/Models/Company.php | 10 ++++++++++ app/Models/User.php | 2 +- config/database.php | 16 +++++++++------- 4 files changed, 22 insertions(+), 8 deletions(-) create mode 100644 app/Models/Company.php diff --git a/app/Console/Commands/ExtranetMigration.php b/app/Console/Commands/ExtranetMigration.php index bca20ea..ccf36ff 100644 --- a/app/Console/Commands/ExtranetMigration.php +++ b/app/Console/Commands/ExtranetMigration.php @@ -114,6 +114,8 @@ class ExtranetMigration extends CubistCommand if ($e->entreprise == 1880) { $roles[] = ['model_id' => $e->utilisateur_id, 'role_id' => 12, 'model_type' => 'App\Models\User']; + }else if($e->entreprise==7){ + $roles[] = ['model_id' => $e->utilisateur_id, 'role_id' => 14, 'model_type' => 'App\Models\User']; } if ($this->_wsRanks[$e->entreprise] > 0) { $roles[] = ['model_id' => $e->utilisateur_id, 'role_id' => $wsgrades[$this->_wsRanks[$e->entreprise]], 'model_type' => 'App\Models\User']; diff --git a/app/Models/Company.php b/app/Models/Company.php new file mode 100644 index 0000000..039299c --- /dev/null +++ b/app/Models/Company.php @@ -0,0 +1,10 @@ + null, ], - 'pgsql' => [ - 'driver' => 'pgsql', + 'extranet_users' => [ + 'driver' => 'mysql', 'host' => env('DB_HOST', '127.0.0.1'), - 'port' => env('DB_PORT', '5432'), - 'database' => env('DB_DATABASE', 'forge'), + 'port' => env('DB_PORT', '3306'), + 'database' => env('DB_USER_DATABASE', 'extranet_users'), 'username' => env('DB_USERNAME', 'forge'), 'password' => env('DB_PASSWORD', ''), - 'charset' => 'utf8', + 'unix_socket' => env('DB_SOCKET', ''), + 'charset' => 'utf8mb4', + 'collation' => 'utf8mb4_unicode_ci', 'prefix' => '', 'prefix_indexes' => true, - 'schema' => 'public', - 'sslmode' => 'prefer', + 'strict' => true, + 'engine' => null, ], 'sqlsrv' => [ -- 2.39.5