# dropDefaultValue doesn't take the schema into account for MS SQL Server

**URL:** <https://forum.liquibase.org/t/dropdefaultvalue-doesnt-take-the-schema-into-account-for-ms-sql-server/2727>\
**Category:** General Discussion\
**Created:** [October 25, 2013, 3:49pm UTC](https://forum.liquibase.org/t/dropdefaultvalue-doesnt-take-the-schema-into-account-for-ms-sql-server/2727 "2013-10-25T15:49:00Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![LaurentRichard](https://avatars.discourse-cdn.com/v4/letter/l/3ab097/32.png) [@LaurentRichard](https://forum.liquibase.org/u/LaurentRichard)\
**Post date:** [October 25, 2013, 3:49pm UTC](https://forum.liquibase.org/t/dropdefaultvalue-doesnt-take-the-schema-into-account-for-ms-sql-server/2727/1 "2013-10-25T15:49:00Z")

</div>

Hi,  
  
I’m still trying to migrate from version 2.0.5 to version 3.0.7 and I encounter some trouble with the dropDefaultValue change on MS SQL Server.  
  
Trying to execute

1. 

works well with version 2 but with version 3, I get  

1. Change Set liquibase/155.xml::201103221000-3::HVS failed.&nbsp; Error: Error executing SQL DECLARE @default sysname
2. SELECT @default = object\_name(default\_object\_id) FROM sys.columns WHERE object\_id=object\_id(‘ **null**.ASSUR’) AND name='TX\_VERS\_E’
3. EXEC ('ALTER TABLE [BIG\_TEST].[ASSUR] DROP CONSTRAINT ’ + @default): Syntaxe incorrecte vers ‘CONSTRAINT’.
4. com.microsoft.sqlserver.jdbc.SQLServerException: Syntaxe incorrecte vers ‘CONSTRAINT’.
5. &nbsp;&nbsp;&nbsp; at com.microsoft.sqlserver.jdbc.SQLServerException.makeFromDatabaseError(SQLServerException.java:216) ~[sqljdbc4-4.0.2206.100.jar:na]
6. &nbsp;&nbsp;&nbsp; …  

It appears that setting the @default variable relies on a request where the prefix to the table is not set. Thus, null is printed instead of the default schema name and the request fails.  
  
Can it be fixed in a coming version ?  
  
Thanks by advance  
  
Laurent

---

<div class="post-metadata">

**Author:** ![Guest](https://avatars.discourse-cdn.com/v4/letter/g/8dc957/32.png) [@Guest](https://forum.liquibase.org/u/Guest)\
**Post date:** [October 25, 2013, 3:49pm UTC](https://forum.liquibase.org/t/dropdefaultvalue-doesnt-take-the-schema-into-account-for-ms-sql-server/2727/2 "2013-10-25T15:49:00Z")

</div>

OK  
I saw it is already referenced as [CORE-1553](https://liquibase.jira.com/browse/CORE-1553). I’m going to work on it and will make a pull request.[  
](https://liquibase.jira.com/browse/CORE-1553)

---

<div class="post-metadata">

**Author:** ![lrichard.fr](https://avatars.discourse-cdn.com/v4/letter/l/ce7236/32.png) [@lrichard.fr](https://forum.liquibase.org/u/lrichard.fr)\
**Post date:** [October 25, 2013, 3:49pm UTC](https://forum.liquibase.org/t/dropdefaultvalue-doesnt-take-the-schema-into-account-for-ms-sql-server/2727/3 "2013-10-25T15:49:00Z")

</div>

The guest is me ![]() (I forgot to log in before publishing)  
  
Laurent

---

<div class="post-metadata">

**Author:** ![lrichard.fr](https://avatars.discourse-cdn.com/v4/letter/l/ce7236/32.png) [@lrichard.fr](https://forum.liquibase.org/u/lrichard.fr)\
**Post date:** [October 25, 2013, 3:49pm UTC](https://forum.liquibase.org/t/dropdefaultvalue-doesnt-take-the-schema-into-account-for-ms-sql-server/2727/4 "2013-10-25T15:49:00Z")

</div>

So here is the pull request [#200](https://github.com/liquibase/liquibase/pull/200)  
Hope it will be taken into account soon for the 3.0.8 release  
  
Regards  
  
Laurent

---

<div class="post-metadata">

**Author:** ![Guest](https://avatars.discourse-cdn.com/v4/letter/g/8dc957/32.png) [@Guest](https://forum.liquibase.org/u/Guest)\
**Post date:** [October 25, 2013, 3:49pm UTC](https://forum.liquibase.org/t/dropdefaultvalue-doesnt-take-the-schema-into-account-for-ms-sql-server/2727/5 "2013-10-25T15:49:00Z")

</div>

Thanks for the pull request, I merged it in so it will be pat of 3.0.8

Nathan
