We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
In src/xPDO/Om/mysql/xPDOManager.php:117 must check is exist table, but this is not working in MySQL8.
When try $manger->createObjectContainer() result is
Error Code: 1146. Table 'eparket.modx_epshop_payment' doesn't exist because table not created yet.`
Error Code: 1146. Table 'eparket.modx_epshop_payment' doesn't exist
$existsStmt = $this->xpdo->query("SELECT table_name FROM information_schema.tables where table_name = $tableName"); if (count($existsStmt->fetchAll()) > 0) { return true; }
The text was updated successfully, but these errors were encountered:
That is not a fix. You are actually accessing the Database Management system's internal database - not your table.
I use the following function to create the tables:
/** * Creates the database tables associated with the package. * * @return bool */ public function createSchemaTables(): bool { $out = false; $schemaObjects = $this->getSchemaObjectNames(); if (count($schemaObjects) > 0) { $manager = $this->modx->getManager(); if ($manager instanceof xPDOManager) { $i = 0; foreach ($schemaObjects as $className) { $i += ($manager->createObjectContainer($this->packageNamespace . $className) ? 1 : 0); } $out = (count($schemaObjects) == $i) ?: false; } } return $out; }
This might be a bit dated. There were issues with the namespace being correctly translated to table names. See #161
Sorry, something went wrong.
No branches or pull requests
In src/xPDO/Om/mysql/xPDOManager.php:117 must check is exist table, but this is not working in MySQL8.
When try $manger->createObjectContainer() result is
Error Code: 1146. Table 'eparket.modx_epshop_payment' doesn't exist
because table not created yet.`Fix
The text was updated successfully, but these errors were encountered: