Skip to content
Permalink
Browse files

Sqlschema Fix for views and Bake

  • Loading branch information...
tgr0ss authored and markstory committed Dec 14, 2015
1 parent a736530 commit d45f6a62b629d322f23a2238c3aa809b2f0ebdee
Showing with 2 additions and 2 deletions.
  1. +2 −2 src/Database/Schema/SqlserverSchema.php
@@ -30,7 +30,7 @@ public function listTablesSql($config)
$sql = "SELECT TABLE_NAME
FROM INFORMATION_SCHEMA.TABLES
WHERE TABLE_SCHEMA = ?
AND TABLE_TYPE = 'BASE TABLE'
AND (TABLE_TYPE = 'BASE TABLE' OR TABLE_TYPE = 'VIEW')
ORDER BY TABLE_NAME";
$schema = empty($config['schema']) ? static::DEFAULT_SCHEMA_NAME : $config['schema'];
return [$sql, [$schema]];
@@ -51,7 +51,7 @@ public function describeColumnSql($tableName, $config)
AC.is_identity AS [autoincrement],
AC.is_nullable AS [null],
OBJECT_DEFINITION(AC.default_object_id) AS [default]
FROM sys.[tables] T
FROM sys.[objects] T
INNER JOIN sys.[schemas] S ON S.[schema_id] = T.[schema_id]
INNER JOIN sys.[all_columns] AC ON T.[object_id] = AC.[object_id]
INNER JOIN sys.[types] TY ON TY.[user_type_id] = AC.[user_type_id]

0 comments on commit d45f6a6

Please sign in to comment.
You can’t perform that action at this time.