Skip to content

Commit

Permalink
test out new config for asset bank db
Browse files Browse the repository at this point in the history
  • Loading branch information
fredbradley committed Jun 20, 2023
1 parent 4a1816a commit 0202821
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 2 deletions.
1 change: 1 addition & 0 deletions app/Models/PublishAction.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ class PublishAction extends Model

protected $fillable = ['ServerName'];

protected $connection = 'assetbank';
protected $primaryKey = 'Id';

public function searchCriteria()
Expand Down
2 changes: 1 addition & 1 deletion app/Models/SearchCriteria.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
class SearchCriteria extends Model
{
protected $table = 'searchcriteria';

protected $connection = 'assetbank';
public $timestamps = false;

public $primaryKey = 'Id';
Expand Down
20 changes: 19 additions & 1 deletion config/database.php
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,25 @@
'prefix' => '',
'foreign_key_constraints' => env('DB_FOREIGN_KEYS', true),
],

'assetbank' => [
'driver' => 'mysql',
//'url' => env('DATABASE_URL'),
'host' => env('ASSET_BANK_DB_HOST', '127.0.0.1'),
'port' => env('ASSET_BANK_DB_PORT', '3306'),
'database' => env('ASSET_BANK_DB_DATABASE', 'assetbank'),
'username' => env('ASSET_BANK_DB_USERNAME', 'forge'),
'password' => env('ASSET_BANK_DB_PASSWORD', ''),
'unix_socket' => env('DB_SOCKET', ''),
'charset' => 'utf8',
'collation' => 'utf8_unicode_ci',
'prefix' => '',
'prefix_indexes' => true,
'strict' => true,
'engine' => null,
'options' => extension_loaded('pdo_mysql') ? array_filter([
PDO::MYSQL_ATTR_SSL_CA => env('MYSQL_ATTR_SSL_CA'),
]) : [],
],
'mysql' => [
'driver' => 'mysql',
'url' => env('DATABASE_URL'),
Expand Down

0 comments on commit 0202821

Please sign in to comment.