Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

fix getSchemaName() for Sqlserver.

Closes #2609.
  • Loading branch information...
commit b545d8b201d7add56a26c755f5e7045965abb05b 1 parent 55b8f66
@rchavik rchavik authored
View
3  lib/Cake/Console/Templates/skel/Config/database.php.default
@@ -48,7 +48,8 @@
* on a per-table basis with the Model::$tablePrefix property.
*
* schema =>
- * For Postgres specifies which schema you would like to use the tables in. Postgres defaults to 'public'.
+ * For Postgres/Sqlserver specifies which schema you would like to use the tables in. Postgres defaults to 'public'. For Sqlserver, it defaults to empty and use
+ * the connected user's default schema (typically 'dbo').
*
* encoding =>
* For MySQL, Postgres specifies the character encoding to use when connecting to the
View
3  lib/Cake/Model/Datasource/Database/Sqlserver.php
@@ -76,6 +76,7 @@ class Sqlserver extends DboSource {
'login' => '',
'password' => '',
'database' => 'cake'
+ 'schema' => '',
);
/**
@@ -792,7 +793,7 @@ public function dropSchema(CakeSchema $schema, $table = null) {
* @return string The schema name
*/
public function getSchemaName() {
- return $this->config['database'];
+ return $this->config['schema'];
}
}

0 comments on commit b545d8b

Please sign in to comment.
Something went wrong with that request. Please try again.