- marked as major
mssql schema is hardcoded to dbo
Hi,
I cant find how to set schema, so I chaged a little mssql module.
it would be nice if code is modified to something like example bellow BTW, it would work with adodbapi, but pymssql would ignore the default schema.
==================== class MSSQLDialect(ansisql.ANSIDialect): def init(self, module=None, auto_identity_insert=False, params): self.module = module or dbmodule self.auto_identity_insert = auto_identity_insert ansisql.ANSIDialect.init(self, params) + self.schema_name = "dbo"
def get_default_schema_name(self):
return self.schema_name
def set_default_schema_name(self, schema_name):
self.schema_name = schema_name
Comments (7)
-
repo owner -
Account Deleted - changed status to resolved
(original author: ram) Comittted in rev 2182, thanks
-
Account Deleted - removed status
-
Account Deleted - changed status to open
-
The fix causes an exception: File "build\bdist.win32\egg\sqlalchemy\databases\mssql.py", line 269, in init NameError: global name 'set_default_schema_name' is not defined
Looks like a typo in the change; small patch attached.
-
- attached mssql.patch
Patch to fix exception
-
Account Deleted - changed status to resolved
(original author: ram) Applied, thanks (and promises to run tests first next time)
- Log in to comment