better schemas support for SQL Server > 2000
authorRafael Kitover <rkitover@cpan.org>
Wed, 17 Oct 2012 18:49:35 +0000 (14:49 -0400)
committerRafael Kitover <rkitover@cpan.org>
Wed, 17 Oct 2012 18:49:35 +0000 (14:49 -0400)
commit7b2db7f3a99d627cd35962744336b3301b3454fc
treef4d488c2ef32aa74a936a812714532284dec1566
parent4b5eca90f633645050d77e5d0c98d05a6cc37502
better schemas support for SQL Server > 2000

Use schema_name() instead of user_name() on > 2000 to detect the
current schema, and query [$db].sys.schemas instead of
[$db].dbo.sysusers for schema names on > 2000.

frew has reported that schema_name() has worked better for him for users
which aren't the owners of the schema.
Changes
lib/DBIx/Class/Schema/Loader/DBI/MSSQL.pm