- Added a new Field Mapper to SQLs Adapters.
- Defined missing MySQL fields attributes - WIP on lean-console's migration methods
This commit is contained in:
1 parent
5f4f23a8e4
commit
411992c7a8
17 files changed
+214
-8
No files matched your search
@@ -2,12 +2,15 @@
|
||||
|
||||
namespace Ulmus\Adapter;
|
||||
|
||||
use Ulmus\ConnectionAdapter;
|
||||
use Ulmus\Entity\Mysql\Table;
|
||||
use Ulmus\Migration\FieldDefinition;
|
||||
use Ulmus\Migration\MigrateInterface;
|
||||
use Ulmus\QueryBuilder\Sql;
|
||||
use Ulmus\Common\PdoObject;
|
||||
|
||||
use Ulmus\Exception\AdapterConfigurationException;
|
||||
use Ulmus\Repository;
|
||||
|
||||
class MySQL implements AdapterInterface, MigrateInterface, SqlAdapterInterface {
|
||||
use SqlAdapterTrait;
|
||||
@@ -166,4 +169,12 @@ class MySQL implements AdapterInterface, MigrateInterface, SqlAdapterInterface {
|
||||
{
|
||||
return Sql\MysqlQueryBuilder::class;
|
||||
}
|
||||
|
||||
public function schemaTable(ConnectionAdapter $adapter, $databaseName, string $tableName) : null|object
|
||||
{
|
||||
return Table::repository(Repository::DEFAULT_ALIAS, $adapter)
|
||||
->select(\Ulmus\Common\Sql::raw('this.*'))
|
||||
->where($this->escapeIdentifier('table_schema', AdapterInterface::IDENTIFIER_FIELD), $databaseName)
|
||||
->loadOneFromField($this->escapeIdentifier('table_name', AdapterInterface::IDENTIFIER_FIELD), $tableName);
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user