Merge pull request #1963 from Sir3lit/maxconn

Add Max Concurrent Connections for database users
This commit is contained in:
Dane Everitt 2020-04-25 11:01:01 -07:00 committed by GitHub
commit 72ecac5236
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
12 changed files with 68 additions and 7 deletions

View file

@ -30,7 +30,7 @@ class Database extends Model
* @var array
*/
protected $fillable = [
'server_id', 'database_host_id', 'database', 'username', 'password', 'remote',
'server_id', 'database_host_id', 'database', 'username', 'password', 'remote', 'max_connections',
];
/**
@ -41,6 +41,7 @@ class Database extends Model
protected $casts = [
'server_id' => 'integer',
'database_host_id' => 'integer',
'max_connections' => 'integer',
];
/**
@ -51,6 +52,7 @@ class Database extends Model
'database_host_id' => 'required|exists:database_hosts,id',
'database' => 'required|string|alpha_dash|between:3,100',
'username' => 'string|alpha_dash|between:3,100',
'max_connections' => 'nullable|integer',
'remote' => 'required|string|regex:/^[0-9%.]{1,15}$/',
'password' => 'string',
];