How to fix the «Table `admin_user` doesn't exist» failure on `bin/magento admin:user:create` while using a database tables prefix?

database
bug
bug-fix
command-line

(Dmitry Fedyuk) #1

01


(Dmitry Fedyuk) #2

It seems to me fixed in Magento 2.3:


(Dmitry Fedyuk) #3

How to fix in Magento < 2.3

Replace the line:


with the following code block:

$this->data =
	[
		self::KEY_PREFIX => \Magento\Framework\App\ObjectManager::getInstance()
			->get(\Magento\Framework\App\DeploymentConfig::class)
				->get(\Magento\Framework\Config\ConfigOptionsListConstants::CONFIG_PATH_DB_PREFIX)
	] + $data
;