mirror of
https://github.com/archtechx/tenancy.git
synced 2025-12-15 11:04:04 +00:00
Merge hotfix branch (#834)
* try specifying the signature in __construct * constructor doesn't work since Reflection is used, try specifying getDefaultName() instead * Fixed: make migration commands compatible * Fix failing tests * Fix username generation * Re-create tmp dir as well if needed * wip
This commit is contained in:
parent
4f19609797
commit
349125c02e
10 changed files with 75 additions and 27 deletions
|
|
@ -7,7 +7,6 @@ namespace Stancl\Tenancy\TenantDatabaseManagers;
|
|||
use Stancl\Tenancy\Concerns\CreatesDatabaseUsers;
|
||||
use Stancl\Tenancy\Contracts\ManagesDatabaseUsers;
|
||||
use Stancl\Tenancy\DatabaseConfig;
|
||||
use Stancl\Tenancy\Exceptions\TenantDatabaseUserAlreadyExistsException;
|
||||
|
||||
class PermissionControlledMySQLDatabaseManager extends MySQLDatabaseManager implements ManagesDatabaseUsers
|
||||
{
|
||||
|
|
@ -26,10 +25,6 @@ class PermissionControlledMySQLDatabaseManager extends MySQLDatabaseManager impl
|
|||
$hostname = $databaseConfig->connection()['host'];
|
||||
$password = $databaseConfig->getPassword();
|
||||
|
||||
if ($this->userExists($username)) {
|
||||
throw new TenantDatabaseUserAlreadyExistsException($username);
|
||||
}
|
||||
|
||||
$this->database()->statement("CREATE USER `{$username}`@`%` IDENTIFIED BY '{$password}'");
|
||||
|
||||
$grants = implode(', ', static::$grants);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue