If the names of the modules and entities are not single words there are errors in the table names and fails to setup:upgrade making a table name that is used unquoted
use the entity name like "entity name" for the entity and a table name like "company_module_entity _name" is created... then in... Magento\Framework\Setup\Declaration\Schema\Db\MySQL\DbSchemaReader::readIndexes
there is where it is used unquoted...
$sql = sprintf('SHOW INDEXES FROM %s WHERE %s', $tableName, $condition);
Some validation was added. Honestly I don't want to make this bullet proof. It's a tool intended for developers not for general public use. If you don't use spaces in the entity name it should work as expected.
If the names of the modules and entities are not single words there are errors in the table names and fails to setup:upgrade making a table name that is used unquoted
use the entity name like "entity name" for the entity and a table name like "company_module_entity _name" is created... then in...
Magento\Framework\Setup\Declaration\Schema\Db\MySQL\DbSchemaReader::readIndexes
there is where it is used unquoted...
$sql = sprintf('SHOW INDEXES FROM %s WHERE %s', $tableName, $condition);