Merge pull request #1963 from Sir3lit/maxconn
Add Max Concurrent Connections for database users
This commit is contained in:
commit
72ecac5236
12 changed files with 68 additions and 7 deletions
|
@ -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',
|
||||
];
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue