- WIP on Migration of MsSQL
This commit is contained in:
1 parent
c54de30069
commit
fb4985160a
17 files changed
+252
-175
No files matched your search
+11
-1
@@ -9,7 +9,8 @@ use Ulmus\Exception\AdapterConfigurationException;
|
||||
use Ulmus\Ulmus;
|
||||
|
||||
use Ulmus\Migration\FieldDefinition;
|
||||
use Ulmus\{Entity\InformationSchema\Table,
|
||||
use Ulmus\{ConnectionAdapter,
|
||||
Entity\InformationSchema\Table,
|
||||
Migration\MigrateInterface,
|
||||
Migration\SqlMigrationTrait,
|
||||
Repository,
|
||||
@@ -246,4 +247,13 @@ class MsSQL implements AdapterInterface, MigrateInterface, SqlAdapterInterface {
|
||||
{
|
||||
return QueryBuilder\Sql\MssqlQueryBuilder::class;
|
||||
}
|
||||
|
||||
public function schemaTable(ConnectionAdapter $adapter, $databaseName, string $tableName) : null|object
|
||||
{
|
||||
return \Ulmus\Entity\Mssql\Table::repository(Repository::DEFAULT_ALIAS, $adapter)
|
||||
->select(\Ulmus\Common\Sql::raw('this.*'))
|
||||
->where($this->escapeIdentifier('table_schema', AdapterInterface::IDENTIFIER_FIELD), $databaseName)
|
||||
->or($this->escapeIdentifier('table_catalog', AdapterInterface::IDENTIFIER_FIELD), $databaseName)
|
||||
->loadOneFromField($this->escapeIdentifier('table_name', AdapterInterface::IDENTIFIER_FIELD), $tableName);
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user